If <<if $HEALTH < 1>> - need help

46 views
Skip to first unread message

Jahanzaib Haque

unread,
Jul 1, 2014, 6:56:16 AM7/1/14
to twee...@googlegroups.com
Hi everyone,

I'm building my first text adventure in Twine so apologies if this is something super basic that I haven't been able to grasp.

In my story I have both $HEALTH and $MORALITY which vary as you make choices and move through passages. I've managed to set $HEALTH and $MORALITY and I have figured out how to +/- both in the passages BUT: 

When  <<if $HEALTH < 1>> i.e. when the player dies due to his/her choices, I want the passage the player has died on to:

Display some text about the death in that particular passage AND remove the live links which are in the passage in case you do not die.

How do I do that? At the end of my (possible death) passages I have e.g.:

<<set $HEALTH = $HEALTH -40>>

<<if $HEALTH < 1>>

The assailants rescue a wounded Aaliya and take you on board as a companion. You go on to become a fairly successful gang member -- that is until turf wars over control of Lyari end with 12 bullets in your gut causing massive blood loss.

You are dead. 

<<endif>>

[[not dead option 1 of passage still showing/clickable]]
[[not dead option 2 of passage still showing/clickable]]

Please help! 

0Bennyman

unread,
Dec 21, 2014, 5:05:08 PM12/21/14
to twee...@googlegroups.com
You could have 

<<if $HEALTH > 0>>
[[not dead option 1 of passage still showing/clickable]]
[[not dead option 2 of passage still showing/clickable]]
<<endif>>
 
Or something like that as then it wouldn't show them. Or you could find a timer macro that would go to a different passage to display the death message. http://www.glorioustrainwrecks.com/node/5108

0Bennyman

unread,
Dec 21, 2014, 5:07:06 PM12/21/14
to twee...@googlegroups.com
You could use 
<<if $HEALTH > 0>>
[[not dead option 1 of passage still showing/clickable]]
[[not dead option 2 of passage still showing/clickable]]
<<endif>>
So it would only display it if above 0. Or you could just use a timer macro to make it go to a different passage to display the death message. http://www.glorioustrainwrecks.com/node/5108

Hope I helped!

Samuel Braithwaite

unread,
Jan 23, 2018, 1:56:45 PM1/23/18
to Tweecode / Twine
What about this
<<if $HEALTH <= 0>>
<<goto "GameOver">>
<</if>> 
Reply all
Reply to author
Forward
0 new messages