Health problem

Non-platform specific questions.

Health problem

Postby Camper1995 » Wed Dec 23, 2009 8:12 pm

Well, its me again. :(

I have a little problem with health. I have 4 enemies for example (all clones)

And I want that every enemy have 100 healts. (variable for that is enemyHP)

So i put in create actor:
Code: Select all
enemyHP+=100;
???

And when destroy actor or something like that...enemyHP... what?

I am a bit confused of that... :? because, I can destroy first enemy, but the others one have many HP, so I cant destroy them first!
__________________________________________________________________________________________________________________

Any ides how to do health for every enemy?

-Thanks, CAmPeR. :arrow: :|
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

Re: Health problem

Postby MrJolteon » Wed Dec 23, 2009 9:16 pm

Demo?
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score

Re: Health problem

Postby Camper1995 » Wed Dec 23, 2009 9:48 pm

Yeah, you can make it if you have time. ;)
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

Re: Health problem

Postby skydereign » Wed Dec 23, 2009 9:52 pm

Not sure if I understood the question... what exactly do you want the enemies to do? When making the variable enemyHP, making it an actor variable will give them their own health. This allows all actors to have their own, so on create actor, all you need is this.
Code: Select all
enemyHP=100;

And each clone has its own value, but it seems you want the destroy of one actor to effect the other clones? Is this the case?
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Health problem

Postby MrJolteon » Thu Dec 24, 2009 8:54 am

Camper1995 wrote:Yeah, you can make it if you have time. ;)

I meant you come with demo so that we can fix it through the demo.
K.jpg
K.jpg (14.77 KiB) Viewed 829 times
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score

Re: Health problem

Postby Camper1995 » Sat Dec 26, 2009 8:03 pm

Lol... :oops: well, I will post it after 31 december.. OK? xD
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

Re: Health problem

Postby MrJolteon » Sun Dec 27, 2009 3:29 pm

Ok.
(I made that post and that picture using Opera Mini on my cellphone)
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron