Mr.Q!
Well-known member
I have this pillar entity that after receiving damage it turns into a damaged version of itself, it changes from its normal idle animation into a desired follow animation after some % of damage. Thing is, despite working well, whenever I hit it, it changes into his "no damaged" pain animation, and it looks wrong of course, because it has already received some damage.
Is there any way in this .txt to tell the engine to use a desired anim follow instead the normal anim pain? Like, if it's using its anim follow2, it should use anim follow7 as anim pain, etc.
You can take a look at the attached image for reference.
Is there any way in this .txt to tell the engine to use a desired anim follow instead the normal anim pain? Like, if it's using its anim follow2, it should use anim follow7 as anim pain, etc.
You can take a look at the attached image for reference.
Code:
anim spawn
loop 0
delay 1
offset 40 144
bbox 0
platform 13 149 -10 -10 64 64 10 150
frame Data/bgs/bonus/ffury2/ff2pilar1.gif
frame Data/bgs/bonus/ffury2/ff2pilar1.gif
sound data/sounds/fallbr3.wav
@cmd landFrame
@cmd spawn001 "gslam1" "gslam1" 0 0 0 0 0
@cmd spawn001 "fslam1" "fslam1" 0 0 0 0 0
frame Data/bgs/bonus/ffury2/ff2pilar1.gif
anim idle
@script
void self = getlocalvar("self");
int hp = getentityproperty(self, "health");
int maxhp = getentityproperty(self, "maxhealth");
if(hp <= 0.7*maxhp){
changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW1"));
}
@end_script
loop 0
delay 1
offset 40 144
bbox 15 23 50 123
platform 13 149 -10 -10 64 64 10 150
frame Data/bgs/bonus/ffury2/ff2pilar1.gif
frame Data/bgs/bonus/ffury2/ff2pilar1.gif
anim follow1
@script
void self = getlocalvar("self");
int hp = getentityproperty(self, "health");
int maxhp = getentityproperty(self, "maxhealth");
if(hp <= 0.4*maxhp){
changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW2"));
}
@end_script
loop 0
delay 1
offset 40 144
bbox 15 23 50 123
platform 13 149 -10 -10 64 64 10 150
frame Data/bgs/bonus/ffury2/ff2pilar2.gif
frame Data/bgs/bonus/ffury2/ff2pilar2.gif
anim follow2
@script
void self = getlocalvar("self");
int hp = getentityproperty(self, "health");
int maxhp = getentityproperty(self, "maxhealth");
if(hp <= 0.2*maxhp){
changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW3"));
}
@end_script
loop 0
delay 1
offset 40 144
bbox 15 23 50 123
platform 13 149 -10 -10 64 64 10 150
frame Data/bgs/bonus/ffury2/ff2pilar3.gif
frame Data/bgs/bonus/ffury2/ff2pilar3.gif
anim follow3
loop 0
delay 1
offset 40 144
bbox 15 23 50 123
platform 13 149 -10 -10 64 64 10 150
frame Data/bgs/bonus/ffury2/ff2pilar4.gif
frame Data/bgs/bonus/ffury2/ff2pilar4.gif
anim pain
loop 0
delay 2
offset 39 144
bbox 15 23 50 123
platform 13 149 -10 -10 64 64 10 150
sound data/sounds/debris1.wav
frame Data/bgs/bonus/ffury2/ff2pilar1.gif
offset 40 144
frame Data/bgs/bonus/ffury2/ff2pilar1.gif
offset 39 144
frame Data/bgs/bonus/ffury2/ff2pilar1.gif
offset 40 141
frame Data/bgs/bonus/ffury2/ff2pilar1.gif
Attachments
Last edited: