0 votes
by (190 points)
closed by
how can i reset a stats to default?

EX: i set $health and $stamina of my hero to 10 then he takes damage and the damge set his life to 5 and stamina to 7.

how can i reset them in cas emy hero take  potion? without re set them to 10
closed with the note: Answered

1 Answer

0 votes
by (159k points)
selected by
 
Best answer

Please use the Question Tags to state the named and full version number of the Story Format you are using, as answers can vary based on this information. I will assume you are using Harlower v3.0.2 as that is the current default story format.

You could use a story variable to record what the maximum health or stamina is, and then use that variable when reseting the associated health or stamina.
(untested example)

(set: $healthMax to 10)
(set: $health to $healthMax)

(set: $staminaMax to 10)
(set: $stamina to $staminaMax)

 

...