Hello guys. Let’s see if you can help me.
I am trying to design a battle between the user who reads the story and a monster.
What I did was the following, then I leave examples:
Create 2 permanent variables, one with the health of the user and one with the health of the monster.
Create a third variable which I call “m”, which is to verify that when the user reaches 0 with their health, it will take you to an “end of game” page.
And finally, create another variable with the name of the monster.
What I can’t get is:
I want that if the user manages to leave the monster with 0 health or less than 0, the user can be redirected to another scene.
And if it is the monster who leaves the user with 0 health points or less than 0, he redirects himself to an “end of game” scene.
What I can’t understand is how to compare health variables and make decisions about them.
Greetings and happy new year.
Example:
*create e1 “hipocampo”
*create s “100”
*create s1 “100”
*create m “0”
*label results
choose an attack
*choice
#Lunar ray.
You use the moonbeam.
$!{e1} Use Scale Dance.
*set s - 9
*set s1 - 12
Your health is from $!{s}, and that of the ${e1} is ${s1}.
*if (m = s1)
*goto_scene game_over
*else
Well, you're still alive.
*goto results
*finish