Probably a Simple Question...

thdgamesthdgames Member Posts: 9
edited November -1 in Working with GS (Mac)
I created a game level that has one main actor that you guide to a goal avoiding bad guys. I put in a health bar following QuantumSheep's tutorial and it works well.

So basically when my actor hits a bad guy he loses energy from the bar. Or when my actor hits a 'dead zone' he dies. – Either way the scene then changes to a 'death screen' that has a button on it to return to a 'start again' screen. You then click 'Start Again' to go to Level 1.

My problem is that the health bar is still at 'zero' and so the level is then unplayable until I reset it manually. I have tried loads of different things including creating an attribute to change the "game.Energy" to "game.Energy=10" on click of the 'Start Again' button but so far nothing seems to work.

I spent a long time trying to get 'Reset Level" to work but looks like I'm beating a dead dog with that.

I'm pretty sure I'm missing something obvious here but hopefully somebody can help or point me to a tutorial for resetting game values, thanks.

T

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    What you're doing actually sounds fine, so I can't really see what's wrong, and not being at home I can't check any examples of my own. Sorry!

    There are far better people at this than me these days, perhaps they'll be able to help.

    Oh, and as an aside, nice tagging of the topics - better luck with the thread title next time ;)

    Good luck,

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • thdgamesthdgames Member Posts: 9
    Thanks QuantumSheep,
    I posted a query before and got no reply at all so I thought I'd try a different approach ;) hence the vague title. Still no joy with resetting the health bar, I think I'll jus start something else from scratch and see if I can figure it out.

    Cheers,
    T
  • O_BirchO_Birch Member Posts: 6
    I know I'm probably late, but did you find the way to fix it ?
Sign In or Register to comment.