Page 1 of 2
Health
Posted:
Thu Feb 22, 2007 9:16 pm
by UltimatHedgehog
i have 3 pictures of a health piece / O \ / O \ / O \ and when you get hit
\ / \ / \ /
i want it to change to my other animation /---\ until you reach the 3rd and my guy changes animation to him \---/ dying and it destroys the actor when the animation finishes
how do i make it change 1 at a time
Posted:
Thu Feb 22, 2007 9:45 pm
by Sgt. Sparky
make it one animation
the animation direction is stopped at the create actor event.
when he gets hit:
- Code: Select all
animpos += 1;
on the draw actor event:
- Code: Select all
if(animpos > TheNumberOfFrames)
{
animpos = 0;
}
Posted:
Thu Feb 22, 2007 11:54 pm
by UltimatHedgehog
Direction is stopped at what actor creation and where do i put the 1st code
Posted:
Fri Feb 23, 2007 12:14 am
by UltimatHedgehog
these arent moving animations just pictures that i need to change color when im hit
Posted:
Fri Feb 23, 2007 12:39 am
by UltimatHedgehog
green is the full red is empty how do i do it with this
Posted:
Fri Feb 23, 2007 12:55 am
by Game A Gogo
you would need this animation then:
And please, try to reduce the size, so it will be smaller, there is too much empty space...
Posted:
Fri Feb 23, 2007 1:02 am
by UltimatHedgehog
ok i have those 4 made
Posted:
Fri Feb 23, 2007 1:26 am
by UltimatHedgehog
i have the empty one set to animation finish change player_actor animation to player_death set to animation finish destroy actor
so when health is empty you die it work when i start will empty
now i need it to change animatoin each time hes hit though
Posted:
Fri Feb 23, 2007 9:47 pm
by UltimatHedgehog
is anyone going to tell me how yet
Posted:
Sat Feb 24, 2007 12:58 am
by Game A Gogo
ok, i will tell you everything you need to do whit that animation.
On the create actor event, select change animation(Stopped)
Then, on the event that is suppose to make the health go lower, do this script:
- Code: Select all
health.animpos++;
if(health.animpos>=3)
{
destroyactor("player");//change anything if needed
}
Posted:
Sat Feb 24, 2007 1:44 am
by UltimatHedgehog
where do i put the code player or health the player colides with enemy to make health change
Posted:
Sat Feb 24, 2007 1:57 am
by Game A Gogo
example, when the player collide whit the enemy, do a script that has the code i sended you
Posted:
Sat Feb 24, 2007 2:45 am
by UltimatHedgehog
the health doesnt change at all
Posted:
Sat Feb 24, 2007 2:57 am
by Game A Gogo
cahnge the
- Code: Select all
health.animpos++;
to
- Code: Select all
health.animpos+=1;
[/quote]
Posted:
Sat Feb 24, 2007 3:07 am
by UltimatHedgehog
same i just posted no change I used changed animation where you had destroy animation by the