dantedevil
Well-known member
I try to create an obstacle count for the bonus stages, but not work.
Then when you destroy all the obstacles, the entity change the animation and spawn the PERFECT text. And finally end the stage.
Here my try:
I can't use the script to change the type of the obstacles to enemies, to avoid all the script check grab of the hero's.
I don't want make a can't grab exception for all obstacles in the bonus stages.
I think the obstale count entity is the best solution.
Then when you destroy all the obstacles, the entity change the animation and spawn the PERFECT text. And finally end the stage.
Here my try:
Code:
#BONUS - OBSTACLE COUNT
anim follow1
@script
void self = getlocalvar("self");
int Obstacle = openborvariant("count_obstacles");
if(Obstacle == 0){
changeentityproperty(self, "velocity", 0, 0, 0);
performattack(self, openborconstant("ANI_FOLLOW2"));
}
@end_script
loop 1
delay 1
offset 1 1
frame data/chars/misc/empty.png
frame data/chars/misc/empty.png
#BONUS - ALL OBSTACLES DESTROY
anim follow2
loop 0
delay 1
offset 1 1
@cmd spawnAniEdge "textlist" 0 18 0 "ANI_FOLLOW3" 0
frame data/chars/misc/empty.png
delay 20
frame data/chars/misc/empty.png
delay 1
@cmd finishlevel
frame data/chars/misc/empty.png
I can't use the script to change the type of the obstacles to enemies, to avoid all the script check grab of the hero's.
I don't want make a can't grab exception for all obstacles in the bonus stages.
I think the obstale count entity is the best solution.