maxman
Well-known member
I use either shoot or shooter function to shoot enemies and it's fine when players' MP gains. However, I need something to not allow their MP gain as an exception. I'd like to make it act like shooter when it shows enemy icons every time it hits except the MP gain. How can I do it?
C:
void shoot(void Shot, float dx, float dy, float dz)
{ // Shooting projectile
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 vShot;
if (Direction == 0){ //Is entity facing left?
dx = -dx; //Reverse X direction to match facing
}
vShot = projectile(Shot, x+dx, z+dz, y+dy, Direction, 0, 0, 0);
return vShot;
}
void shooter(void Shot, float dx, float dy, float dz, float Vx, float Vy, float Vz)
{ // Shooting projectile with speed control
void self = getlocalvar("self");
int Direction = getentityproperty(self, "direction");
void vShot;
int Dx = Vx;
if (Direction == 0){ //Is entity facing left?
Dx = -Dx; //Reverse Dx direction to match facing
}
vShot = shoot(Shot, dx, dy, dz);
changeentityproperty(vShot, "velocity", Dx, Vz, Vy);
changeentityproperty(vShot, "speed", Vx);
}
Code:
anim freespecial #POWER WAVE
offset 140 188
delay 6
bbox 114 89 51 98
load powave
sound data/sounds/heroes/terry/06_terry_00010.wav
frame data/chars/heroes/Terry/148_0.png
frame data/chars/heroes/Terry/148_1.png
frame data/chars/heroes/Terry/148_2.png
frame data/chars/heroes/Terry/148_3.png
delay 3
bbox 114 107 51 81
frame data/chars/heroes/Terry/148_4.png
bbox 116 120 64 71
frame data/chars/heroes/Terry/148_4.png
delay 6
@cmd shooter "powave" 51 0 0 2 0 0
bbox 131 120 53 71
frame data/chars/heroes/Terry/148_5.png
frame data/chars/heroes/Terry/148_6.png
frame data/chars/heroes/Terry/148_7.png
frame data/chars/heroes/Terry/148_8.png
frame data/chars/heroes/Terry/148_9.png
frame data/chars/heroes/Terry/148_10.png
frame data/chars/heroes/Terry/148_11.png
bbox 123 124 54 64
frame data/chars/heroes/Terry/148_12.png