Edited online
parent
4a4a2378d4
commit
1c4a588ac3
13
Guide.md
13
Guide.md
|
@ -46,4 +46,15 @@ If a condition is true at the moment, the phrase is shown. If a condition is nil
|
|||
|
||||
Now the third phrase is initially out. If the player chooses the second one, it hides away and the third shows up. The conditions can also be functions - they have to return a boolean (`true` or `false`). Conditions can be as complex as you want it, they have the complete game state to check.
|
||||
|
||||
What's also important here is that: conditions are checked on every look in the room. The player can activate an inventory object and have a different set of options immediately. The `choice` object can react even at INSTEAD preferences change — everything you can think of. It's often much easier than setting every phrase on and off with direct instructions.
|
||||
What's also important here is that: conditions are checked on every look in the room. The player can activate an inventory object and have a different set of options immediately. The `choice` object can react even at INSTEAD preferences change — everything you can think of. It's often much easier than setting every phrase on and off with direct instructions.
|
||||
|
||||
## rndstr module
|
||||
A very short module that gives you a string randomization function. Example usage:
|
||||
|
||||
rndstr({
|
||||
'Ow!',
|
||||
'Oh!',
|
||||
'Holy pink horse in the sky!'
|
||||
});
|
||||
|
||||
This results in a random string from the table.
|
Loading…
Reference in a new issue