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

0 favourites
  • 7 posts
From the Asset Store
The ultimate voice pack filled with 1,536 files of .......wav and mp3 of individual numbers, letters, and words (that go
  • Hi guys, newbie here

    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

  • 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)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

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

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

  • 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.

  • 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...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)