dantedevil
Well-known member
I am currently working on the bonus stage and I have a problem.
In the bonus stage I have an obstacle that is changing anim follow, as it loses health.
Example:
Here the problem, in the bonus stage you see obstacle health for 2player2 and 3 player.
If 2 players, or 3 are playing, the energy will be greater than the one designated in the lifecheck script and it will not see well how the frames go to destroy the obstacle.
I think the solution would be to modify the following script, so that it works based on percentages, instead of doing so by checking the exact amount of health.
Something like this:
In the bonus stage I have an obstacle that is changing anim follow, as it loses health.
Example:
Code:
anim idle
loop 1
delay 10
offset 100 162
bbox 74 80 52 82
platform 100 165 -45 -45 45 45 20 500
@cmd lifeCheck 30 "ANI_FOLLOW1"
frame data/chars/misc/buda01.png
anim follow1
loop 1 2 4
delay 2
offset 100 162
bbox 74 80 52 82
platform 100 165 -45 -45 45 45 20 500
sound data/sounds/stone.wav
frame data/chars/misc/buda02.png
frame data/chars/misc/buda02.png
@cmd lifeCheck 20 "ANI_FOLLOW2"
frame data/chars/misc/buda02.png
frame data/chars/misc/buda02.png
anim follow2
loop 1 2 4
delay 10
offset 100 162
bbox 74 80 52 82
platform 100 165 -45 -45 45 45 20 500
sound data/sounds/stone.wav
frame data/chars/misc/buda03.png
frame data/chars/misc/buda03.png
@cmd lifeCheck 10 "ANI_FOLLOW3"
frame data/chars/misc/buda03.png
frame data/chars/misc/buda03.png
anim follow3
loop 1 2 4
delay 10
offset 100 162
bbox 74 80 52 82
platform 100 165 -45 -45 45 45 20 500
sound data/sounds/stone.wav
frame data/chars/misc/buda04.png
frame data/chars/misc/buda04.png
@cmd lifeCheck 0 "ANI_FALL"
frame data/chars/misc/buda04.png
frame data/chars/misc/buda04.png
anim fall
loop 0
delay 12
nodieblink 3
offset 100 162
@cmd stop
platform 0 0 0 0 0 0
sound data/sounds/stone2.wav
frame data/chars/misc/buda05.png
frame data/chars/misc/buda06.png
frame data/chars/misc/buda07.png
frame data/chars/misc/buda08.png
@cmd killentity getlocalvar("self")
frame data/chars/misc/empty.png
Here the problem, in the bonus stage you see obstacle health for 2player2 and 3 player.
Code:
spawn Buda
health 150
2phealth 350
3phealth 550
flip 1
coords 238 229
If 2 players, or 3 are playing, the energy will be greater than the one designated in the lifecheck script and it will not see well how the frames go to destroy the obstacle.
I think the solution would be to modify the following script, so that it works based on percentages, instead of doing so by checking the exact amount of health.
Code:
void lifeCheck (int iLife, void Ani)
// Check the life and change the animation if the life is higher than given value
// Douglas Baldan - 04/11/2013
{
void self = getlocalvar("self");
void Health = getentityproperty(self,"health");
if(Health<=iLife)
{
changeentityproperty(self, "animation", openborconstant(Ani));
}
}
Something like this:
Code:
anim idle
loop 1
delay 10
offset 100 162
bbox 74 80 52 82
platform 100 165 -45 -45 45 45 20 500
@cmd lifeCheck 30% "ANI_FOLLOW1"
frame data/chars/misc/buda01.png
anim follow1
loop 1 2 4
delay 2
offset 100 162
bbox 74 80 52 82
platform 100 165 -45 -45 45 45 20 500
sound data/sounds/stone.wav
frame data/chars/misc/buda02.png
frame data/chars/misc/buda02.png
@cmd lifeCheck 20% "ANI_FOLLOW2"
frame data/chars/misc/buda02.png
frame data/chars/misc/buda02.png
anim follow2
loop 1 2 4
delay 10
offset 100 162
bbox 74 80 52 82
platform 100 165 -45 -45 45 45 20 500
sound data/sounds/stone.wav
frame data/chars/misc/buda03.png
frame data/chars/misc/buda03.png
@cmd lifeCheck 10% "ANI_FOLLOW3"
frame data/chars/misc/buda03.png
frame data/chars/misc/buda03.png
anim follow3
loop 1 2 4
delay 10
offset 100 162
bbox 74 80 52 82
platform 100 165 -45 -45 45 45 20 500
sound data/sounds/stone.wav
frame data/chars/misc/buda04.png
frame data/chars/misc/buda04.png
@cmd lifeCheck 0 "ANI_FALL"
frame data/chars/misc/buda04.png
frame data/chars/misc/buda04.png
anim fall
loop 0
delay 12
nodieblink 3
offset 100 162
@cmd stop
platform 0 0 0 0 0 0
sound data/sounds/stone2.wav
frame data/chars/misc/buda05.png
frame data/chars/misc/buda06.png
frame data/chars/misc/buda07.png
frame data/chars/misc/buda08.png
@cmd killentity getlocalvar("self")
frame data/chars/misc/empty.png
Last edited: