Permanent If

Is there some way to make it so that if a stat ever reaches zero, the game goes to a scene? (such as death) It would make coding much easier.
Thanks :smiley:

I am no pro at this by any means, in fact CJW or one of the others may have a simple fix. But I would make a check

*label death_check
 *if (heatlh=>0)
  *goto_scene death

Then I would run the check every time heath was changed. Of course I have not tested this one, but use something similar for a banking system. Hope this helps.

Yup, just like @lordirishdas said:

*label death_check
*if (health<=0)

…*goto_scene death

Then, whenever you need to:

The monster hits you!
*set health -5
*gosub death_check
You shrug off the wound and carry on.

EDIT: Ignore the < br >, I don’t know why that is there.

@Lucid the Forum doesn’t parse HTML perfectly, using a crocodile sign causes weird things like that to happen… If you use one in a private message it deletes everything after it… .-.

Okay, that should save me some time. Thanks for your help

@Lucid put `

` on the line before examples, and `

` and the yellow block which retains spaces too.

Thanks, @Reaperoa , that’s handy!

I see that the crocs still give the br problem though. But, I like that pre to show spaces clearly for indentation.