kimono
Well-known member
Hello fellow code experts,
I'm trying to delete summoned entities when the summoner dies.
I tried writing this small script in its death animation:
But it doesn't seem to work, as evidenced by the video:
Alf's scheme is also supposed to be much more subtle; it involves encouraging Kenshiro to hit his poisoned cloak, which can cause a clone to be summoned in front of and behind him.
I tried to translate it like this in its animation block, but I don't know if it's correct:
From anime to video games, this is the type of combat I wanted to translate 
How can I correct my code so that it's correct? Thanks for your lights
I'm trying to delete summoned entities when the summoner dies.
I tried writing this small script in its death animation:
Code:
anim death
landframe 1
delay 15
offset 25 81
@script
if(frame==1){
void self = getlocalvar("self");
void alfclone = getlocalvar("alfclone");
killentity(alfclone); //kill all spawned enemies entities
}
@end_script
@cmd dasher -3.5 0.1 0 1
frame data/chars/alf/hit.png
frame data/chars/alf/hit.png
@cmd stop
offset 25 87
frame data/chars/alf/death1.png
frame data/chars/alf/death2.png
frame data/chars/alf/death3.png
frame data/chars/alf/death4.png
frame data/chars/alf/death5.png
frame data/chars/alf/death6.png
frame data/chars/alf/death7.png
sound data/sounds/explode4.wav
frame data/chars/alf/death8.png
frame data/chars/alf/death9.png
frame data/chars/alf/death10.png
frame data/chars/alf/death11.png
frame data/chars/alf/death12.png
But it doesn't seem to work, as evidenced by the video:
Alf's scheme is also supposed to be much more subtle; it involves encouraging Kenshiro to hit his poisoned cloak, which can cause a clone to be summoned in front of and behind him.
I tried to translate it like this in its animation block, but I don't know if it's correct:
Code:
anim block
offset 25 81
bbox 9 1 33 80
range 80 150
followanim 1
followcond 1
delay 6
hitfx data/sounds/aof2-199.wav
frame data/chars/alf/block1.png
anim follow1 #Spawn Clones
delay 15
offset 25 81
bbox 9 1 33 80
@cmd spawn01 "alfclone" 150 0 0
@cmd spawn01 "alfclone" -150 0 0
frame data/chars/alf/block2.png
frame data/chars/alf/block3.png
frame data/chars/alf/block4.png
frame data/chars/alf/block5.png
frame data/chars/alf/block6.png
frame data/chars/alf/block7.png
How can I correct my code so that it's correct? Thanks for your lights
Last edited: