Author Topic: New bow errors.  (Read 1883 times)

I was working on an Ice Bow for the Medieval pack and I need something that will freeze your player for 3 seconds upon being hit. Solved

Now I need to know how to make a projectile burn the player along with mount an emitter to them without using states/images.

Now I need to fix the icebow. When it hits a vehicle, it crashes the game. Is there something to make the icebow not run the function when it connects with a vehicle?


I need something that will register a headshot for the Arbalest

I need something that will make the icebow make it so your items get put back in your inventory so you cannot switch weapons/use weapons while frozen
« Last Edit: June 30, 2009, 07:15:23 PM by heedicalking »

Could you change their datablock to something like the No Move Playertype, then change it back after 3 seconds? Or the slippery player or something.

I would need to package that though.

Use this.  Not projectile::onCollision or some other silly method.

Use this.  Not projectile::onCollision or some other silly method.
So would I copy the thing for the first one into my script the do a on projectile::damage or something like that and then under that make it set the playertype? I should get more scripting lessons because I really have no clue how to do this.

Package it and replace projectile with your projectile name.  Then you should take out what's in the middle (it doesn't seem useful to rewrite it for your uses) and write parent::damage(%this,%obj,%col,%fade,%pos,%normal);  Then you should do something like %col.setDatablock(noMovePlayer);  Try messing around with the max speed of a player and jumpForce and a few other things.

I could do that but what about making it un freeze the player? Also, would I put the %col.setdatablock(noMovePlayer); in the function that I copied?
« Last Edit: June 30, 2009, 09:58:31 AM by heedicalking »

I would save it to one of the players variables (%col.lastDatablock = %col.getDatablock();) before the setDatablock().  Then I think you can use %col.schedule(500,setDatablock,%col.lastDatablock); to set them back in 500ms.  And yes you would.

Ok, I will do some tests. What do I remove in Badspot's script?

everything inside the function, replaced with that parent::damage() thing i showed you

It looks like this
Code: [Select]
function ProjectileData::damage(%this,%obj,%col,%fade,%pos,%normal)
{
   parent::damage(%this,%obj,%col,%fade,%pos,%normal);
(%col.lastDatablock = %col.getDatablock();) 
%col.setDatablock(Icebowarmor);
%col.schedule(500,setDatablock,%col.lastDatablock);     
}

Would I replace ProjectileData with Icebowprojectile? Also, I guess I failed making that work. Haven't tested.

package it in a package like this:

Code: [Select]
package iceBow
{
      //Stuff here
};
activatePackage(iceBow)

Remove the parenthesees from %col.lastDatablock = %col.getDatablock();  -  I didn't mean that literally

Like this?
Code: [Select]
package iceBow
{
parent::damage(%this,%obj,%col,%fade,%pos,%normal);
%col.lastDatablock = %col.getDatablock(); 
%col.setDatablock(Icebowarmor);
%col.schedule(500,setDatablock,%col.lastDatablock);     
};
activatePackage(iceBow)

I didn't say remove the function.  add the function YOURPORJECTILENAMEHERE::damage() thing back.

I didn't say remove the function.  add the function YOURPORJECTILENAMEHERE::damage() thing back.
'I am so sorry. It is just that I suck. I tried my hardest

Code: [Select]
package iceBow
{
function ProjectileData::damage(%this,%obj,%col,%fade,%pos,%normal)
{
   parent::damage(%this,%obj,%col,%fade,%pos,%normal);
   (%col.lastDatablock = %col.getDatablock();) 
   %col.setDatablock(Icebowarmor);
   %col.schedule(500,setDatablock,%col.lastDatablock);     
}
};
activatePackage(iceBow)