Page 1 of 2

Health

PostPosted: 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

PostPosted: Thu Feb 22, 2007 9:45 pm
by Sgt. Sparky
make it one animation
the animation direction is stopped at the create actor event.
:D
when he gets hit:
Code: Select all
animpos += 1;

on the draw actor event:
Code: Select all
if(animpos > TheNumberOfFrames)
{
  animpos = 0;
}

:D

PostPosted: Thu Feb 22, 2007 11:54 pm
by UltimatHedgehog
Direction is stopped at what actor creation and where do i put the 1st code

PostPosted: Fri Feb 23, 2007 12:14 am
by UltimatHedgehog
these arent moving animations just pictures that i need to change color when im hit

PostPosted: Fri Feb 23, 2007 12:39 am
by UltimatHedgehog
Image
Image
green is the full red is empty how do i do it with this

PostPosted: 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...

PostPosted: Fri Feb 23, 2007 1:02 am
by UltimatHedgehog
ok i have those 4 made

PostPosted: 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

PostPosted: Fri Feb 23, 2007 9:47 pm
by UltimatHedgehog
is anyone going to tell me how yet

PostPosted: 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
}

PostPosted: 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

PostPosted: 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

PostPosted: Sat Feb 24, 2007 2:45 am
by UltimatHedgehog
the health doesnt change at all

PostPosted: 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]

PostPosted: 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