oldyz
Well-known member
i am trying to fix the old bug where a recovery landing freezes the players.
in this code are a couple of attempted fixes, like changing animation to a fall8 animation
or a sucide based on health.
@danno solved this problem by making sure the character gets +1 health point when landing,
where i seek the opposite, if health is zero character dies.
anyway here is the code:
be aware that i have tried @cmd killentity,@cmd suicide, @cmd hurtself, etc on the last frame, next to last frame, etc.
killentity results in the character completely dissapearing and with him all of the continues, game dont get stuck, but you loose all lives
in this code are a couple of attempted fixes, like changing animation to a fall8 animation
or a sucide based on health.
@danno solved this problem by making sure the character gets +1 health point when landing,
where i seek the opposite, if health is zero character dies.
anyway here is the code:
Code:
anim freespecial39
@script
void self = getlocalvar("self");
void SHealth = getentityproperty(self,"health");
if (frame == 5){
setidle(self);
changeentityproperty(self, "health", SHealth + 4);
}
@end_script
offset 72 140
jumpframe 0 3 -1 0
bbox 0 0 0 0
landframe 5
delay 10
sound data/sounds/jump.wav
frame data/chars/chris/d4
@cmd aiflag "falling" 0 "common_pain"
@cmd aiflag "drop" 0 "common_pain"
@cmd aiflag "projectile" 0 "common_pain"
frame data/chars/chris/d2
frame data/chars/chris/d1
@cmd HealthSwitch0 "ANI_fall8"
#@cmd DeadSwitch0 4
frame data/chars/chris/069
delay 1000
frame data/chars/chris/056
attack 0 0 0 0
delay 5
frame data/chars/chris/sel0 ## og 054
be aware that i have tried @cmd killentity,@cmd suicide, @cmd hurtself, etc on the last frame, next to last frame, etc.
killentity results in the character completely dissapearing and with him all of the continues, game dont get stuck, but you loose all lives