0 votes
by (120 points)
sugarcube 2.18. my idea is to have player select a food, like pizza, and that will increase happiness by 2 points but decrease health by 3 points. the status counts for both (health/happiness) must remain on screen for all choice pages and count up or down based on foods chosen..player may die if health reaches 0

1 Answer

0 votes
by (44.7k points)

Basically you just make some variables to keep track of those things, modify them in the link that the user will click to select the item, and if that modification goes below zero for the health variable, then go to the "Game Over" passage (or whatever you decide to call it).

See this other question I just posted an answer to, which has a fairly similar question.  A few modifications of that should get you what you want.

by (120 points)

i see you can add to the score like this

<<set $Happiness += 5>>

but what if i want happiness to go up by 5 AND health to go down by 2 in the same choice?  

by (159k points)
<<set $Happiness += 5, $Health -= 2>>

 

...