Good trick my friend, thanks.
Now here my problem:
I have the stage fatality in the train station. This stage have Z coords 233 270. The tracks with electricity they are at the bottom of the stage, above the Z 233, obviously.
So when kill an enemy with the stage fatality, I need the enemy fall over the track, to do this real, I need the enemy don't touch the floor, to avoid the dust and the sprite fall shows in the bottom of the level, instead of on the tracks.
With this fall with "degravity" the animation looks perfect:
Code:
#-----------------------Stage Fatal 2--------------------#
anim fall48
loop 0
@script
void self = getlocalvar("self");
if(frame == 1){
changeentityproperty(self, "setlayer", -1);
}
@end_script
offset 82 177
delay 16
jumpframe 0 -0.1 0 -0.1
dropframe 1
fshadow 0
drawmethod scale 0.9 0.9
sound data/chars/vipers/fall.wav
frame data/chars/vipers/fall3.png
frame data/chars/vipers/fall3.png
frame data/chars/vipers/fall3.png
frame data/chars/vipers/fall3.png
delay 8
@cmd degravity 1
@cmd stop
frame data/chars/vipers/fall4.png
@cmd spawn01 "gbody" 0 0 1
frame data/chars/vipers/pain8.png
frame data/chars/vipers/fall4.png
sound data/sounds/ladydie.wav
frame data/chars/vipers/pain8.png
delay 4
drawmethod remap 3
frame data/chars/vipers/fall4.png
nodrawmethod
frame data/chars/vipers/fall4.png
delay 8
frame data/chars/vipers/pain8.png
frame data/chars/vipers/fall4.png
frame data/chars/vipers/pain8.png
@cmd spawn01 "gbody" 0 0 1
frame data/chars/vipers/fall4.png
frame data/chars/vipers/pain8.png
frame data/chars/vipers/fall4.png
delay 4
drawmethod remap 3
frame data/chars/vipers/pain8.png
nodrawmethod
frame data/chars/vipers/pain8.png
delay 8
frame data/chars/vipers/fall4.png
frame data/chars/vipers/pain8.png
frame data/chars/vipers/fall4.png
@cmd spawn01 "gbody" 0 0 1
frame data/chars/vipers/pain8.png
frame data/chars/vipers/fall4.png
frame data/chars/vipers/pain8.png
delay 4
drawmethod remap 3
frame data/chars/vipers/fall4.png
nodrawmethod
frame data/chars/vipers/fall4.png
delay 8
frame data/chars/vipers/pain8.png
frame data/chars/vipers/fall4.png
frame data/chars/vipers/pain8.png
delay 4
@cmd spawn01 "gbodyfat" 0 0 1
frame data/chars/vipers/fall4.png
drawmethod remap 3
frame data/chars/vipers/fall4.png
nodrawmethod
frame data/chars/vipers/pain8.png
drawmethod remap 5
frame data/chars/vipers/mapsh1.png
drawmethod remap 3
frame data/chars/vipers/fall4.png
nodrawmethod
frame data/chars/vipers/fall4.png
frame data/chars/vipers/pain8.png
drawmethod remap 5
frame data/chars/vipers/mapsh1.png
nodrawmethod
frame data/chars/vipers/fall4.png
frame data/chars/vipers/fall4.png
frame data/chars/vipers/pain8.png
drawmethod remap 5
frame data/chars/vipers/mapsh1.png
nodrawmethod
frame data/chars/vipers/pain8.png
drawmethod remap 5
frame data/chars/vipers/mapsh1.png
delay 70
@cmd spawn01 "smoky2" 0 8 1
frame data/chars/vipers/mapsh2.png
@cmd spawn01 "smoky2" 0 8 1
frame data/chars/vipers/mapsh2.png
@cmd spawn01 "smoky2" 0 8 1
frame data/chars/vipers/mapsh2.png
delay 1
frame data/chars/vipers/mapsh2.png
@script
void self = getlocalvar("self");
int Health = getentityproperty(self, "health");
if(frame==47){
changeentityproperty(self, "health", Health-30);
if (Health <= 0){
damageentity(self, self, 500, 1, openborconstant("ATK_NORMAL48"));
}
}
@end_script
frame data/chars/vipers/mapsh2.png
But for some reason the fall at the end never goes to the death animation.
And the stage get stuck if kill an enemy with the stage fatality.
So it's any way to make a forced ANICHANGE to anim death?
PD: I don't want use the killentity and spawn another entity to play death.
Because that was my previous method, works well, but in the end use the same entity for all enemies to avoid make a new entity for every enemy.
With the new method all enemies have their personal sprites for the death and only need create a new pallete for this sprites.