Script for bomb toss control

DJGameFreakTheIguana

Active member
I know their may be a way to script this, but while I do have a script for tossing a bomb, is there one for controlling their speed and jump for each one? I have an entity that will use multiple bombs and it would save time seeing if this can be done rather then using 7 or 8 separate bombs.

x)
 
@DJ: You can use this function to control tossed bomb's speed:

Code:
void tosser(void Bomb, float dx, float dy, float dz, float Vx, float Vy, float Vz)
{ // Tossing bomb with desired speed
   void self = getlocalvar("self");
   int Direction = getentityproperty(self, "direction");
   int x = getentityproperty(self, "x");
   int y = getentityproperty(self, "a");
   int z = getentityproperty(self, "z");
   void Shot;

   if (Direction == 0){ //Is entity facing left?                  
      dx = -dx; //Reverse X direction to match facing
   }

   Shot = projectile(Bomb, x+dx, z+dz, y+dy, Direction, 0, 1, 0);
   tossentity(Shot, Vy, Vx, Vz);
   changeentityproperty(Shot, "speed", Vx); 
}
 
Back
Top Bottom