dantedevil
Well-known member
It is possible to add to this script the key based speed control of the keyshoot?
I want use left of right to change to change the speed of the grenade , like the keymove script in the characters.
- keyshoot {projectilename} {x} {y} {z} {Vx} {Vz}
Shooting projectile with key based speed control. Up or down key moves the projectile up or down respectively. Projectile moves forward whether up or down is pressed or not
projectilename = name of shot projectile
x = x distance relative to char
y = y distance relative to char
z = z distance relative to char
Vx = x velocity
Vz = z velocity
I want use left of right to change to change the speed of the grenade , like the keymove script in the characters.
Code:
void toss(void Bomb, float dx, float dy, float dz)
{ // Tossing bomb
void self = getlocalvar("self");
int Direction = getentityproperty(self, "direction");
int x = getentityproperty(self, "x");
int y = getentityproperty(self, "a");
int z = getentityproperty(self, "z");
if (Direction == 0){ //Is entity facing left?
dx = -dx; //Reverse X direction to match facing
}
projectile(Bomb, x+dx, z+dz, y+dy, Direction, 0, 1, 0);
}
- keyshoot {projectilename} {x} {y} {z} {Vx} {Vz}
Shooting projectile with key based speed control. Up or down key moves the projectile up or down respectively. Projectile moves forward whether up or down is pressed or not
projectilename = name of shot projectile
x = x distance relative to char
y = y distance relative to char
z = z distance relative to char
Vx = x velocity
Vz = z velocity
Last edited: