For Player Health

Get help using Construct 2

Post » Wed Feb 27, 2013 7:22 am

Hi,

I wana to know how to use health variable for player

I have created a variable that name is health and set the value is 3
( want when enemy hit the player in 1 time the player will not destroy and same to the second hit and last hit that is 3 time when enemy hit the player the player will destroy that it )


And create the sub-event for the player

player health<1 player destroy

but this is not working well
so plz help me

B
12
S
2
G
3
Posts: 57
Reputation: 3,439

Post » Wed Feb 27, 2013 10:39 am

Well that's the right thing to do
You can make it when player is hit to subtract 1 from health
and as you posted when health is=0 or <1 or whatever, then destroy
B
12
S
3
G
1
Posts: 120
Reputation: 1,829

Post » Fri Mar 01, 2013 7:31 am

Thanks Pakost

that is working one again thanks a lot for help

B
12
S
2
G
3
Posts: 57
Reputation: 3,439

Post » Fri Mar 01, 2013 7:41 am

Hi Pakost,

I have another question that is for game speed When I checked the game on my local system that is working fine but when I tested it on my android phone that time speed is too slow.

basically when I click the moving button with the help of touch event

I have this code

event
Touch---Is Touching --(object)

action

Player ------ set X to self.X +self.xSpeed*dt

where xSpeed is plyer's variable.

do you have any idea what is the issues

B
12
S
2
G
3
Posts: 57
Reputation: 3,439


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, OddConfection and 19 guests