O Ilusionista
Captain 100K
Hi guys, I am having an issue with the Z velocity.
I have an enemy which spawns another enemy when the first one dies, but it spawns the second enemy on a specific animation just to make it fall on the screen and, when it reaches 200 in z axis, it will spawn an effect and dies - this is to simulate a second enemy falling from a flying bike and diving on the water.
But in all my tests, the second enemy never flies towards the screen. Most of times, it just get stuck on the screen. I can make it flies upward (-z) but never downward (z+), toward the screen.
What I am doing wrong? I just want to make it move on the Z axis, the other ones are not required.
The spawn code:
@cmd spawnAni "afx" 0 0 0 "ANI_FOLLOW11" -2 0 4
The enemy code:
anim follow11
loop
0
delay
10
offset
90 116
@script
void self = getlocalvar("self");
int z = getentityproperty(self,"z");
if(z >= 200){
shooter2 ("splash",20,0,5,-6,0,0);
killentity(self);
}
@end_script
@cmd
minZ 0
@cmd
maxZ 0
@cmd
velo001 2 4 4
frame
data/chars/enemies/soldier/fall1.gif
delay
1000
movez
8
frame
data/chars/enemies/soldier/fall2.gif
frame
data/chars/enemies/soldier/fall3.gif
I have an enemy which spawns another enemy when the first one dies, but it spawns the second enemy on a specific animation just to make it fall on the screen and, when it reaches 200 in z axis, it will spawn an effect and dies - this is to simulate a second enemy falling from a flying bike and diving on the water.
But in all my tests, the second enemy never flies towards the screen. Most of times, it just get stuck on the screen. I can make it flies upward (-z) but never downward (z+), toward the screen.
What I am doing wrong? I just want to make it move on the Z axis, the other ones are not required.
The spawn code:
@cmd spawnAni "afx" 0 0 0 "ANI_FOLLOW11" -2 0 4
The enemy code:
anim follow11
loop
0
delay
10
offset
90 116
@script
void self = getlocalvar("self");
int z = getentityproperty(self,"z");
if(z >= 200){
shooter2 ("splash",20,0,5,-6,0,0);
killentity(self);
}
@end_script
@cmd
minZ 0
@cmd
maxZ 0
@cmd
velo001 2 4 4
frame
data/chars/enemies/soldier/fall1.gif
delay
1000
movez
8
frame
data/chars/enemies/soldier/fall2.gif
frame
data/chars/enemies/soldier/fall3.gif