Gamebook Scripting [SOLVED]

I'm working on a gamebook - I've discovered that I can use{player.alias}along with the regular text in the description text box to have a character say the player's name. (eg. "{player.alias}, I need your help!") I also see there are a few other scripting options on the right side of the description box. How do I use those? Specifically, right now, I want to be able to use If/then scripts in the middle of the text, but when I click the IF button, it only adds {if flag:} to the box, and I can't figure out how to do the rest of the script so that it works.

I do have a flag that gets set if the player makes a specific choice earlier in the game. I'd like to be able to use that flag to set up different responses in the middle of the text using IF (not just in the scripting GUI at the top of the page)

I've tried cutting and pasting the code from the GUI, and I also tried this:

{if flag: yes then 
   msg ("blah blah blah")
}

with the flag name (yes) both with quotes and without. Please help. Thank you in advance!


if you named your flag "yes" you can do

{if yes:blah blah blah}

There is no else clause so when you want output text when the flag is not set you can do it this way

{if not yes:some other blah blah}

here's the doc for the text processor commands:

http://docs.textadventures.co.uk/quest/text_processor.html

The text processor commands are the easiest-quickest way (but is more limited) to add scripting to your 'msg' Scripts (GUI/Editor: run as script -> add new script -> 'output' section -> 'print a message' Script -> [MESSAGE]:text/strings ONLY, or {EXPRESSION]:Text/strings ONLY, VARIABLES ONLY, or Text/strings+VARIABLES, script options --- I think the text processor commands will even work for/with the [MESSAGE] sript option)


HK edit: failed attempt at trying to explain the syntax, so ignore this below:

for the most part, the syntax works like this:

{DON'T_REPLACE_THIS_FIRST_WORD/WHATEVER_(INCLUDING_ALSO_THE_not_IF_THERE_TOO)_EXCEPT_IF_IT_IS_object.attribute: USUALLY_YOU_HAVE_TO_REPLACE_ALL_OF_THIS_STUFF_EXCEPT_THE_SYMBOLS_LIKE_THE_COLONS}

replace the 'object.attribute' (and my 'NAMEOF_OBJECT.NAME_OF_ATTRIBUTE' below) with your desired Objects and their Attributes you want to use:

NAME_OF_OBJECT.NAME_OF_ATTRIBUTE


too lazy to show how to do the syntaxes for all of them, so instead as you need help with a syntax, just let us know, and we'll help you with it.


for the most part, the syntax works like this:

{DON'T_REPLACE_THIS_FIRST_WORD/WHATEVER_(INCLUDING_ALSO_THE_not_IF_THERE_TOO)_EXCEPT_IF_IT_IS_object.attribute: USUALLY_YOU_HAVE_TO_REPLACE_ALL_OF_THIS_STUFF_EXCEPT_THE_SYMBOLS_LIKE_THE_COLONS}

replace the 'object.attribute' (and my 'NAMEOF_OBJECT.NAME_OF_ATTRIBUTE' below) with your desired Objects and their Attributes you want to use:

NAME_OF_OBJECT.NAME_OF_ATTRIBUTE

???? What do you mean by that? That confuses more than it helps.


I was trying to explain the syntax... my mistake for causing more confusion, sighs.


Thank you both for your help! I get it now. =D


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums