Health

Non-platform specific questions.

Health

Postby UltimatHedgehog » Thu Feb 22, 2007 9:16 pm

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
Image
I always thought Hell would be a giant load screen that goes on for eternity, then one day, eons later, it would end, only to reveal a slightly different loading screen.
User avatar
UltimatHedgehog
 
Posts: 325
Joined: Fri Jan 19, 2007 1:48 pm
Location: http://downloads.khinsider.com/?u=112542 plz click
Score: 10 Give a positive score

Postby Sgt. Sparky » Thu Feb 22, 2007 9:45 pm

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
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby UltimatHedgehog » Thu Feb 22, 2007 11:54 pm

Direction is stopped at what actor creation and where do i put the 1st code
Image
I always thought Hell would be a giant load screen that goes on for eternity, then one day, eons later, it would end, only to reveal a slightly different loading screen.
User avatar
UltimatHedgehog
 
Posts: 325
Joined: Fri Jan 19, 2007 1:48 pm
Location: http://downloads.khinsider.com/?u=112542 plz click
Score: 10 Give a positive score

Postby UltimatHedgehog » Fri Feb 23, 2007 12:14 am

these arent moving animations just pictures that i need to change color when im hit
Image
I always thought Hell would be a giant load screen that goes on for eternity, then one day, eons later, it would end, only to reveal a slightly different loading screen.
User avatar
UltimatHedgehog
 
Posts: 325
Joined: Fri Jan 19, 2007 1:48 pm
Location: http://downloads.khinsider.com/?u=112542 plz click
Score: 10 Give a positive score

Postby UltimatHedgehog » Fri Feb 23, 2007 12:39 am

Image
Image
green is the full red is empty how do i do it with this
Image
I always thought Hell would be a giant load screen that goes on for eternity, then one day, eons later, it would end, only to reveal a slightly different loading screen.
User avatar
UltimatHedgehog
 
Posts: 325
Joined: Fri Jan 19, 2007 1:48 pm
Location: http://downloads.khinsider.com/?u=112542 plz click
Score: 10 Give a positive score

Postby Game A Gogo » Fri Feb 23, 2007 12:55 am

you would need this animation then:

And please, try to reduce the size, so it will be smaller, there is too much empty space...
Attachments
untitled.PNG
health
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby UltimatHedgehog » Fri Feb 23, 2007 1:02 am

ok i have those 4 made
Image
I always thought Hell would be a giant load screen that goes on for eternity, then one day, eons later, it would end, only to reveal a slightly different loading screen.
User avatar
UltimatHedgehog
 
Posts: 325
Joined: Fri Jan 19, 2007 1:48 pm
Location: http://downloads.khinsider.com/?u=112542 plz click
Score: 10 Give a positive score

Postby UltimatHedgehog » Fri Feb 23, 2007 1:26 am

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
Image
I always thought Hell would be a giant load screen that goes on for eternity, then one day, eons later, it would end, only to reveal a slightly different loading screen.
User avatar
UltimatHedgehog
 
Posts: 325
Joined: Fri Jan 19, 2007 1:48 pm
Location: http://downloads.khinsider.com/?u=112542 plz click
Score: 10 Give a positive score

Postby UltimatHedgehog » Fri Feb 23, 2007 9:47 pm

is anyone going to tell me how yet
Image
I always thought Hell would be a giant load screen that goes on for eternity, then one day, eons later, it would end, only to reveal a slightly different loading screen.
User avatar
UltimatHedgehog
 
Posts: 325
Joined: Fri Jan 19, 2007 1:48 pm
Location: http://downloads.khinsider.com/?u=112542 plz click
Score: 10 Give a positive score

Postby Game A Gogo » Sat Feb 24, 2007 12:58 am

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
}
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby UltimatHedgehog » Sat Feb 24, 2007 1:44 am

where do i put the code player or health the player colides with enemy to make health change
Image
I always thought Hell would be a giant load screen that goes on for eternity, then one day, eons later, it would end, only to reveal a slightly different loading screen.
User avatar
UltimatHedgehog
 
Posts: 325
Joined: Fri Jan 19, 2007 1:48 pm
Location: http://downloads.khinsider.com/?u=112542 plz click
Score: 10 Give a positive score

Postby Game A Gogo » Sat Feb 24, 2007 1:57 am

example, when the player collide whit the enemy, do a script that has the code i sended you
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby UltimatHedgehog » Sat Feb 24, 2007 2:45 am

the health doesnt change at all
Image
I always thought Hell would be a giant load screen that goes on for eternity, then one day, eons later, it would end, only to reveal a slightly different loading screen.
User avatar
UltimatHedgehog
 
Posts: 325
Joined: Fri Jan 19, 2007 1:48 pm
Location: http://downloads.khinsider.com/?u=112542 plz click
Score: 10 Give a positive score

Postby Game A Gogo » Sat Feb 24, 2007 2:57 am

cahnge the
Code: Select all
health.animpos++;
to
Code: Select all
health.animpos+=1;
[/quote]
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby UltimatHedgehog » Sat Feb 24, 2007 3:07 am

same i just posted no change I used changed animation where you had destroy animation by the
Image
I always thought Hell would be a giant load screen that goes on for eternity, then one day, eons later, it would end, only to reveal a slightly different loading screen.
User avatar
UltimatHedgehog
 
Posts: 325
Joined: Fri Jan 19, 2007 1:48 pm
Location: http://downloads.khinsider.com/?u=112542 plz click
Score: 10 Give a positive score

Next

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron