Conditional: variable

Started by SillySue, Sat 24/04/2004 09:40:19

Previous topic - Next topic

SillySue

What does it mean when it says

Conditional: If variable is set to certain number


..

You can define a variable to be a certain number by clicking on edit variables in that interaction. Or using scripts. (eg (haverope=1))

It allows you to make stuff happen when you want it not all the time..

An example of using variables so that when a player looks in a box he gets a piece of rope but when he looks again he won't get it again.

So you could set up a variable say called 'doihaverope' and set its default to 0. Then when you look at the box you set its actions like this.

If Variable (doihaverope) is 1
------Display a message (I already looked in there)
If variable (doihaverope) is 0
------Display a message (Oooh... Rope!)
------ Give player Inventory
------Game- Set variable Value (doihaverope to 1)

Its that way round (you get the message for when you already have it first) because if it was the other way round the game would give you the inventory and then display (I alreay looked in there) ..

Hope you understood this...

SillySue


..

:D Glad you found it usefull.

SMF spam blocked by CleanTalk