Health Bar problem, I'm going crazy over this :'(

Get help using Construct 2

Post » Fri Aug 14, 2015 5:25 pm

Hi guys, newbie here :D
I need help, I'm having a problem with my health bar for platform game ..
It's hard to explain but the health value randomly changes ..
Example : Hp is at 100, collide with enemy -10 hp but ...in my case the value changes rapidly, instead of 90hp it sky rocketed to 240,180,60 and thn my character dies.

I'm pretty confused myself, so I'll just post the .capx instead :thanks guys ;)

Edit : Sorry guys, I cant post link etc here ... rep <300 :(

any ideas about my endeavor ?

<SOLVED> Turns out I accidentally selected "movement" variable instead of "Health"
Silly me xD[/quote]
Last edited by achik1990 on Sat Aug 15, 2015 11:30 am, edited 4 times in total.
B
5
S
1
Posts: 14
Reputation: 409

Post » Fri Aug 14, 2015 5:29 pm

You could try to put another condition:
When player collides with enemy +Every 0.1 seconds: Substract 10 from HP
(by the way, your link was removed)
B
9
S
3
Posts: 152
Reputation: 1,270

Post » Fri Aug 14, 2015 6:38 pm

CloveltOc wrote:You could try to put another condition:
When player collides with enemy +Every 0.1 seconds: Substract 10 from HP
(by the way, your link was removed)


sadly yeah ... gotta have 300 rep for posting links :?

im pretty noob at expression etc but should i literally put "+Every 0.1 seconds" ?

been stuck at this problem for a week now :(
B
5
S
1
Posts: 14
Reputation: 409

Post » Fri Aug 14, 2015 7:21 pm

Does the health go to -240,180,60? Like, does it go in to the negatives?
B
42
S
11
G
1
Posts: 264
Reputation: 3,299

Post » Fri Aug 14, 2015 7:58 pm

I would copy the events to a text editor,and post them here...somebody will give you a solution straight away.
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,881

Post » Fri Aug 14, 2015 7:59 pm

bclikesyou wrote:Does the health go to -240,180,60? Like, does it go in to the negatives?


the 1st collision was accurate i.e : 100hp-10hp = 90hp but after the 2nd and so forth it went crazy ...
240-180-60 ... but as far as I know there were no negative numbers

I did the health bar instead of text but it's still the same.

Funny thing is .. I have no problem when creating health for enemies ..
enemy's health behave like it should while my character didn't.
B
5
S
1
Posts: 14
Reputation: 409

Post » Fri Aug 14, 2015 8:02 pm

chrisbrobs wrote:I would copy the events to a text editor,and post them here...somebody will give you a solution straight away.


please do :( you have my eternal gratitude
I'm stuck ... I have no idea what to do now...
B
5
S
1
Posts: 14
Reputation: 409


Return to How do I....?

Who is online

Users browsing this forum: ametueraspirant, dand, mickclarke and 28 guests