probably a few newbie questions
Omar Alvarado
16 Aug 2013, 02:28so not sure if these questions have been answered yet. So I'm wanting to create a game in which menus are used quite heavily. However not sure if its just my screen reader being evil, or do menus seem to be inactive? The last I can click on is "get input then run script", but obviously that's not what I want to do. Also is the "ask a question" option unavailable under the output section? I am also unable to click on it. Also one last question, do timers loop and how can you stop them from doing so in a game? Thanks a lot everyone!
HegemonKhan
16 Aug 2013, 02:50here's some useful links for people new to quest:
http://quest5.net/wiki/Main_Page
http://quest5.net/wiki/Tutorial (extremely useful for people new to quest!)
http://quest5.net/wiki/How_to
viewforum.php?f=18
http://quest5.net/wiki/Hs-multiple
http://quest5.net/wiki/Multiple_choices ... %22_script
http://quest5.net/wiki/Category:All_Fun ... t_Commands (page 1, range: A-S)
http://quest5.net/w/index.php?title=Cat ... h#mw-pages (page 2, range: S-Z)
Menus:
http://quest5.net/wiki/Showing_a_menu
http://quest5.net/wiki/Character_Creation (see this, as it's a good example of using a menu)
http://quest5.net/wiki/Show_menu
http://quest5.net/wiki/Using_Lists
http://quest5.net/wiki/Split
http://quest5.net/wiki/Switch
Dialogue:
http://quest5.net/wiki/Conversations
http://quest5.net/wiki/Dynamic_Menus_for_Conversations
http://quest5.net/wiki/Hs-asktell
http://quest5.net/wiki/Hs-addingquestion1
http://quest5.net/wiki/Hs-addingquestion2
viewtopic.php?f=18&t=3179
viewtopic.php?f=18&t=2643
Timers (and some Turnscripts too):
http://quest5.net/wiki/Using_timers_and_turn_scripts
http://quest5.net/wiki/Timelimitedpuzzles
http://quest5.net/wiki/Hs-countdown
hopefully this stuff can help you, hehe.
---------------
about the "get input" script:
this enables the person playing the game to type in their response, which can then be used by the game, through the use of "result" (the thing~word that the person playing the game typed in, is set to "result" within its script block).
so, here's how it's done (also see the "character creation" link above for a better guide to follow, lol):
in the GUI (Graphical User Interface) ~Editor:
(this is the noob-friendly windows with the buttons and drop down options)
add a~new script -> Output -> Print a message -> Print [MESSAGE] "What is your name?" ->
Add a~new script -> Output -> get input ->
-> Add a~new script -> Variables -> Set a variable or attribute -> object.attribute = result
object.attribute = result
****************************
object.attribute = result---> (as an example, let's use) player.alias = result
object ---> player
. ---> .
attribute ---> alias
= ---> =
result ---> result
*****************************
as an example, let's use:
player.alias = result
as the player of the game, I'd type in "HK", and the game engine (internally) will then set (understand that) "result" = HK, and so thus this too: player.alias = HK
which I can now use elsewhere:
(an example) Add a~new script -> Output -> Print a message -> Print [EXPRESSION] player.alias + " is awesome!"
which will display while playing the game, as:
HK is awesome!
--------------------------
for doing a menu, you want:
Add a~new script -> Output -> show menu -> (fill in its stuff)
http://quest5.net/wiki/Main_Page
http://quest5.net/wiki/Tutorial (extremely useful for people new to quest!)
http://quest5.net/wiki/How_to
viewforum.php?f=18
http://quest5.net/wiki/Hs-multiple
http://quest5.net/wiki/Multiple_choices ... %22_script
http://quest5.net/wiki/Category:All_Fun ... t_Commands (page 1, range: A-S)
http://quest5.net/w/index.php?title=Cat ... h#mw-pages (page 2, range: S-Z)
Menus:
http://quest5.net/wiki/Showing_a_menu
http://quest5.net/wiki/Character_Creation (see this, as it's a good example of using a menu)
http://quest5.net/wiki/Show_menu
http://quest5.net/wiki/Using_Lists
http://quest5.net/wiki/Split
http://quest5.net/wiki/Switch
Dialogue:
http://quest5.net/wiki/Conversations
http://quest5.net/wiki/Dynamic_Menus_for_Conversations
http://quest5.net/wiki/Hs-asktell
http://quest5.net/wiki/Hs-addingquestion1
http://quest5.net/wiki/Hs-addingquestion2
viewtopic.php?f=18&t=3179
viewtopic.php?f=18&t=2643
Timers (and some Turnscripts too):
http://quest5.net/wiki/Using_timers_and_turn_scripts
http://quest5.net/wiki/Timelimitedpuzzles
http://quest5.net/wiki/Hs-countdown
hopefully this stuff can help you, hehe.
---------------
about the "get input" script:
this enables the person playing the game to type in their response, which can then be used by the game, through the use of "result" (the thing~word that the person playing the game typed in, is set to "result" within its script block).
so, here's how it's done (also see the "character creation" link above for a better guide to follow, lol):
in the GUI (Graphical User Interface) ~Editor:
(this is the noob-friendly windows with the buttons and drop down options)
add a~new script -> Output -> Print a message -> Print [MESSAGE] "What is your name?" ->
Add a~new script -> Output -> get input ->
-> Add a~new script -> Variables -> Set a variable or attribute -> object.attribute = result
object.attribute = result
****************************
object.attribute = result---> (as an example, let's use) player.alias = result
object ---> player
. ---> .
attribute ---> alias
= ---> =
result ---> result
*****************************
as an example, let's use:
player.alias = result
as the player of the game, I'd type in "HK", and the game engine (internally) will then set (understand that) "result" = HK, and so thus this too: player.alias = HK
which I can now use elsewhere:
(an example) Add a~new script -> Output -> Print a message -> Print [EXPRESSION] player.alias + " is awesome!"
which will display while playing the game, as:
HK is awesome!
--------------------------
for doing a menu, you want:
Add a~new script -> Output -> show menu -> (fill in its stuff)
Omar Alvarado
16 Aug 2013, 18:48woopse, maybe I should have kind of specified which version I'm using. At the moment since I'm using NVDA the open source screen reader, I'm using the web version, since the offline version seems to not be accessible.

jaynabonne
16 Aug 2013, 19:13The last items in the Output script list are:
Print web link
Print email link
Print a list
Wait for key press
Get input
Show a menu
Ask a question
Run JavaScript
I've never used NVDA before, so I installed it. There is something odd right after "get input". For me, it says "get input" twice before moving on, and even just now when I did a copy/paste, there was a blank line after get input. I hope the above helps.
Print web link
Print email link
Print a list
Wait for key press
Get input
Show a menu
Ask a question
Run JavaScript
I've never used NVDA before, so I installed it. There is something odd right after "get input". For me, it says "get input" twice before moving on, and even just now when I did a copy/paste, there was a blank line after get input. I hope the above helps.
Omar Alvarado
16 Aug 2013, 20:55I can't click on any of those, now that I've gone and experimented. Any ideas? After get input, if I arrow down or right, NVDA just says checked. Are those last options disabled or is it just NVDA being evil?

jaynabonne
16 Aug 2013, 21:05Can you use Google Chrome? You can arrow down in that browser. I haven't found a magic keystroke yet that works in Internet Explorer.
Omar Alvarado
16 Aug 2013, 21:34I can try it. At the moment I am using seamonkey, which is from the same team that create firefox.
Thanks for the suggestion!
Thanks for the suggestion!
m4u
03 Sept 2013, 23:09Links not working, server down?
privateer
04 Sept 2013, 16:32Also a newbie...so would I be right in saying that you can't create lists using the GUI?
(I can see the day is coming where I shall have to start using code mode...)
Thanks!
(I can see the day is coming where I shall have to start using code mode...)
Thanks!

jaynabonne
04 Sept 2013, 16:53You can create static lists using the GUI (desktop editor), and you can always create them using scripts, using expressions in the script editor.
privateer
04 Sept 2013, 18:53Good to know, but can't find it on 5.3. The Using_Lists link speaks of using NewStringList functions, but doesn't explain what or where they are.
In general, I am finding the beginners tutorial fine for very basic stuff but I need to get beyond it. And when you go beyond that in the wiki resource everything is geared to a much higher level of familiarity. Not much to bridge the gap. Having searched the GUIs script menus, I can find things relating to lists, but nothing for creating one. No doubt I am being very thick. As you pointed out, it's there...I'm just not seeing it
In general, I am finding the beginners tutorial fine for very basic stuff but I need to get beyond it. And when you go beyond that in the wiki resource everything is geared to a much higher level of familiarity. Not much to bridge the gap. Having searched the GUIs script menus, I can find things relating to lists, but nothing for creating one. No doubt I am being very thick. As you pointed out, it's there...I'm just not seeing it

HegemonKhan
04 Sept 2013, 22:34*see the bolded part, for how to create a list in the GUI~Editor*
*and read below the bolded part too, as noobs don't often realize or understand this aspect*
--------
you can cheat (hehe), though it's a bit more time-consuming (and it's hard remembering GUI~Editor <-> Code conversions, lol):
-------
if you can work with code, put it in as code, then switch back to the GUI~Editor, letting the game engine itself, find and create the GUI~Editor scripts for it, which then allows you to see how it's done in the GUI~Editor.
Also, you can write any code you want through the GUI~Editor 's scripts via using this script of it:
Add a~new script -> Output -> Print a message -> Print [EXPRESSION] -> (type in whatever or any script that you want and it'll work ~ it'll convert what you type in, into the correct GUI~Editor script for~of it)
this script, Add a~new script -> Output -> Print a message -> Print [EXPRESSION], can do ANY~ALL script(s) that you want! It's the "super script", so if you can't find a script in the GUI~Editor (or maybe it just doesn't have the script, lol), then just use this script to do what you want. Though using this script (as it allows for), is literally just writing in the code itself, hehe
And, *just slightly* less powerful, is this script too:
Add a~new script -> Variables -> Set a variable or an attribute
---------
two ways to view the game code:
1. open up a quest game (or library) file (name_of_file.aslx) with notepad, wordpad, or notepad++
2. within the GUI~Editor, at the top is a button that looks like a notepaper (it's between the "play" and the "?-help" buttons), this notepaper button is a toggle between the GUI~Editor mode and the Code View (in-code) mode.
--------
unless, you already have a "code logic" mentality and~or already know coding, how to do stuff with the GUI~Editor and its scripts, isn't very intuitive...
and, unfortunately, the GUI~Editor doesn't make this clear at all, but to do (create) a new list:
Add a~new script -> Output -> Print a message -> Print [EXPRESSION] -> name_of_object.name_of_list = NewStringList ()
~OR~
Add a~new script -> Variables -> Set a variable or an attribute -> name_of_object.name_of_list = NewStringList ()
~OR~
Add a~new script -> Objects -> Create an object -> Name: (whatever), Type [NAME]: stringlist (or objectlist) // err, I'm getting an error, but I think if done correctly, this will create a list, unless lists aren't considered as "Objects", and thus this way won't work obviously.
// notice how, what you type in, is the same. This is the script in code form for creating a new list
// if you want to use some other list (such as the player's inventory or a room's objects), then just change the "NewStringList" to whatever it needs to be ~ you'll have to look this up or ask us
and then, to add (or remove) items to (or from) a list:
Add a~new script -> Variables -> Add a value to a list (or remove a value from a list)
--------------------
literally 95% of what you use to make your game will be:
1. Add a~new script -> Variables -> Set a variable or attribute
2. Add a~new script -> Scripts -> If... (or Switch...)
you can do almost ANYTHING~EVERYTHING with just these two scripts! seriously~literally !!!
----
also, extremely (80% of your game, lol ~ slightly less useful than the above two scripts) useful scripts:
Boolean ("flag") Attribute usage:
1. Add a~new script -> Variables -> Set a variable or attribute
3. Add a~new script -> Variables -> Set (or Unset) object flag
using~err, making, whatever lol~ (and thus calling) Functions:
4. Functions -> Add -> (make your function)
5. Add a~new script -> Scripts -> Call function -> (type in the name of the function that you want to "call"~use~activate~do)
*and read below the bolded part too, as noobs don't often realize or understand this aspect*
--------
you can cheat (hehe), though it's a bit more time-consuming (and it's hard remembering GUI~Editor <-> Code conversions, lol):
-------
if you can work with code, put it in as code, then switch back to the GUI~Editor, letting the game engine itself, find and create the GUI~Editor scripts for it, which then allows you to see how it's done in the GUI~Editor.
Also, you can write any code you want through the GUI~Editor 's scripts via using this script of it:
Add a~new script -> Output -> Print a message -> Print [EXPRESSION] -> (type in whatever or any script that you want and it'll work ~ it'll convert what you type in, into the correct GUI~Editor script for~of it)
this script, Add a~new script -> Output -> Print a message -> Print [EXPRESSION], can do ANY~ALL script(s) that you want! It's the "super script", so if you can't find a script in the GUI~Editor (or maybe it just doesn't have the script, lol), then just use this script to do what you want. Though using this script (as it allows for), is literally just writing in the code itself, hehe

And, *just slightly* less powerful, is this script too:
Add a~new script -> Variables -> Set a variable or an attribute
---------
two ways to view the game code:
1. open up a quest game (or library) file (name_of_file.aslx) with notepad, wordpad, or notepad++
2. within the GUI~Editor, at the top is a button that looks like a notepaper (it's between the "play" and the "?-help" buttons), this notepaper button is a toggle between the GUI~Editor mode and the Code View (in-code) mode.
--------
unless, you already have a "code logic" mentality and~or already know coding, how to do stuff with the GUI~Editor and its scripts, isn't very intuitive...
and, unfortunately, the GUI~Editor doesn't make this clear at all, but to do (create) a new list:
Add a~new script -> Output -> Print a message -> Print [EXPRESSION] -> name_of_object.name_of_list = NewStringList ()
~OR~
Add a~new script -> Variables -> Set a variable or an attribute -> name_of_object.name_of_list = NewStringList ()
~OR~
Add a~new script -> Objects -> Create an object -> Name: (whatever), Type [NAME]: stringlist (or objectlist) // err, I'm getting an error, but I think if done correctly, this will create a list, unless lists aren't considered as "Objects", and thus this way won't work obviously.
// notice how, what you type in, is the same. This is the script in code form for creating a new list
// if you want to use some other list (such as the player's inventory or a room's objects), then just change the "NewStringList" to whatever it needs to be ~ you'll have to look this up or ask us
and then, to add (or remove) items to (or from) a list:
Add a~new script -> Variables -> Add a value to a list (or remove a value from a list)
--------------------
literally 95% of what you use to make your game will be:
1. Add a~new script -> Variables -> Set a variable or attribute
2. Add a~new script -> Scripts -> If... (or Switch...)
you can do almost ANYTHING~EVERYTHING with just these two scripts! seriously~literally !!!
----
also, extremely (80% of your game, lol ~ slightly less useful than the above two scripts) useful scripts:
Boolean ("flag") Attribute usage:
1. Add a~new script -> Variables -> Set a variable or attribute
3. Add a~new script -> Variables -> Set (or Unset) object flag
using~err, making, whatever lol~ (and thus calling) Functions:
4. Functions -> Add -> (make your function)
5. Add a~new script -> Scripts -> Call function -> (type in the name of the function that you want to "call"~use~activate~do)
HegemonKhan
04 Sept 2013, 23:21let me demonstrate:
in GUI~Editor:
Add a~new script -> Output -> Print a message -> Print [EXPRESSION]
~OR~
Add a~new script -> Variables -> Set a variable or attribute
~and also~
Add a~new script -> Scripts -> If...
~OR~
Add a~new script -> Scripts -> Switch...
in Code:
Object.Attribute=Value (which includes an expression)
if (Object.Attribute=Value) {
-> // blah script(s)
}
~OR~
switch (Object.Attribute) {
-> case (Value_1) {
->-> // blah script(s)
-> }
-> case (Value_2) {
->-> // blah script(s)
-> }
-> etc etc cases
}
-----------------------------------
okay, the demonstrations, of these scripts' POWER:
A Boolean ("Flag") Attribute creation: orc.dead=false // the orc is not dead = the orc is alive
A Boolean ("Flag") Attribute's "Reset~Reflagging", such as after HK kills the orc, hehe: orc.dead=true // the orc is dead = the orc is not alive
An Integer Attribute:
HK.strength=100
An Integer Attribute being increased (such as at a lvl up) ~ A very simple Game Mechanic (lol):
HK.strength = HK.strength + 5
A (more complex) Game Mechanic:
HK.damage = (((HK.strength - orc.endurance) / 100) * HK.physical_damage) + HK.physical_damage - orc.physical_resistance
A new (object) list creation (and adding an item to list):
HK.spellbook=NewObjectList ()
list add (HK.spellbook, "fireball")
Moving an object (yes, there's a script in the GUI~Editor specifically for this, but we don't need it, lol):
from: spellbook.parent=room
to: spellbook.parent=HK
(pretend our "orc" enemy will follow and attack you, until you or it is dead, hehe)
from: orc.parent=room
to: orc.parent=HK.parent
for example:
from: orc.parent=room
from: HK.parent=room
to: HK.parent=room2
orc.parent=HK.parent // orc.parent = room2 = HK.parent
// in~the effect, to: orc.parent=room2
etc etc etc...
I've done many different GUI~Editor scripts with just a single GUI~Editor script, which is:
GUI~Editor: Add a~new script -> Variables -> Set a variable or attribute == Object.Attribute=Value :Code
and there's also this too (for conditionals):
GUI~Editor: Add a~new script -> Scripts -> If... == If (Object.Attribute=Value) { scripts } :Code
Or, just this (as this script can do any~all scripts), lol:
Add a~new script -> Output -> Print a message -> Print [EXPRESSION] == msg (blah) :Code
in GUI~Editor:
Add a~new script -> Output -> Print a message -> Print [EXPRESSION]
~OR~
Add a~new script -> Variables -> Set a variable or attribute
~and also~
Add a~new script -> Scripts -> If...
~OR~
Add a~new script -> Scripts -> Switch...
in Code:
Object.Attribute=Value (which includes an expression)
if (Object.Attribute=Value) {
-> // blah script(s)
}
~OR~
switch (Object.Attribute) {
-> case (Value_1) {
->-> // blah script(s)
-> }
-> case (Value_2) {
->-> // blah script(s)
-> }
-> etc etc cases
}
-----------------------------------
okay, the demonstrations, of these scripts' POWER:
A Boolean ("Flag") Attribute creation: orc.dead=false // the orc is not dead = the orc is alive
A Boolean ("Flag") Attribute's "Reset~Reflagging", such as after HK kills the orc, hehe: orc.dead=true // the orc is dead = the orc is not alive
An Integer Attribute:
HK.strength=100
An Integer Attribute being increased (such as at a lvl up) ~ A very simple Game Mechanic (lol):
HK.strength = HK.strength + 5
A (more complex) Game Mechanic:
HK.damage = (((HK.strength - orc.endurance) / 100) * HK.physical_damage) + HK.physical_damage - orc.physical_resistance
A new (object) list creation (and adding an item to list):
HK.spellbook=NewObjectList ()
list add (HK.spellbook, "fireball")
Moving an object (yes, there's a script in the GUI~Editor specifically for this, but we don't need it, lol):
from: spellbook.parent=room
to: spellbook.parent=HK
(pretend our "orc" enemy will follow and attack you, until you or it is dead, hehe)
from: orc.parent=room
to: orc.parent=HK.parent
for example:
from: orc.parent=room
from: HK.parent=room
to: HK.parent=room2
orc.parent=HK.parent // orc.parent = room2 = HK.parent
// in~the effect, to: orc.parent=room2
etc etc etc...
I've done many different GUI~Editor scripts with just a single GUI~Editor script, which is:
GUI~Editor: Add a~new script -> Variables -> Set a variable or attribute == Object.Attribute=Value :Code
and there's also this too (for conditionals):
GUI~Editor: Add a~new script -> Scripts -> If... == If (Object.Attribute=Value) { scripts } :Code
Or, just this (as this script can do any~all scripts), lol:
Add a~new script -> Output -> Print a message -> Print [EXPRESSION] == msg (blah) :Code
privateer
05 Sept 2013, 11:25Thank you very much for your reply HegemonKhan. I think I have a reasonable "code mentality". This is just a new language for me and seems quite distinct from what I'm used to. I will follow your and Jaynabonne's advice, for which I am very grateful. Cheers!
HegemonKhan
05 Sept 2013, 15:03my bad, I chose to presume you were totally new to both quest coding~GUI and coding in general, so again, my apologies!
------------
either, I'm just not doing the right syntax~format for "Print [EXPRESSION]" or I'm just mistaken about it, as I can't get it to work for doing any script. I had thought that I remembered seeing it convert into the proper script once the GUI~Editor reloads, but now it doesn't anymore. I also thought I had read somewhere that it can do any script as well, but in not being able to reproduce this at all now (unless my syntax~format is just wrong, or if it got taken out with the newer versions), I was probably mistaken (very badly) about it, lol.
-------------
regardless, the specific script to use for making a new list or dictionary is:
Add a~new script -> Variables -> Set a variable or an attribute -> Object.Attribute = NewStringList ()
Add a~new script -> Variables -> Set a variable or an attribute -> Object.Attribute = NewObjectList ()
Add a~new script -> Variables -> Set a variable or an attribute -> Object.Attribute = NewStringDictionary ()
Add a~new script -> Variables -> Set a variable or an attribute -> Object.Attribute = NewObjectDictionary ()
Add a~new script -> Variables -> Set a variable or an attribute -> Object.Attribute = NewScriptDictionary ()
unfortunately the GUI~Editor (as far as I know) doesn't have the needed: "NewList ()" or "NewDictionary ()", and this isn't very intuitive to realize on your own. I think (but don't quote me on it, lol) the "create~new lists~dictionaries" are internal functions of the core coding, which further makes it more obscure to realize to use it in the GUI~Editor, as you don't even know that it's using~doing a "call(ing of a) function", with empty parameters: "(____ , ____ , ____ , etc blank parameter slots)" == "()", as you're using the "list~dictionary add" scripts to add in the items instead to your new~blank list~dictionary.
So, as can be seen, for doing some aspects in the GUI~Editor, you've got to write in your scripts~codings or just parts of them, too, utilizing the GUI~Editor 's scripts which allows for inputting Expressions~Values.
------------
either, I'm just not doing the right syntax~format for "Print [EXPRESSION]" or I'm just mistaken about it, as I can't get it to work for doing any script. I had thought that I remembered seeing it convert into the proper script once the GUI~Editor reloads, but now it doesn't anymore. I also thought I had read somewhere that it can do any script as well, but in not being able to reproduce this at all now (unless my syntax~format is just wrong, or if it got taken out with the newer versions), I was probably mistaken (very badly) about it, lol.
-------------
regardless, the specific script to use for making a new list or dictionary is:
Add a~new script -> Variables -> Set a variable or an attribute -> Object.Attribute = NewStringList ()
Add a~new script -> Variables -> Set a variable or an attribute -> Object.Attribute = NewObjectList ()
Add a~new script -> Variables -> Set a variable or an attribute -> Object.Attribute = NewStringDictionary ()
Add a~new script -> Variables -> Set a variable or an attribute -> Object.Attribute = NewObjectDictionary ()
Add a~new script -> Variables -> Set a variable or an attribute -> Object.Attribute = NewScriptDictionary ()
unfortunately the GUI~Editor (as far as I know) doesn't have the needed: "NewList ()" or "NewDictionary ()", and this isn't very intuitive to realize on your own. I think (but don't quote me on it, lol) the "create~new lists~dictionaries" are internal functions of the core coding, which further makes it more obscure to realize to use it in the GUI~Editor, as you don't even know that it's using~doing a "call(ing of a) function", with empty parameters: "(____ , ____ , ____ , etc blank parameter slots)" == "()", as you're using the "list~dictionary add" scripts to add in the items instead to your new~blank list~dictionary.
So, as can be seen, for doing some aspects in the GUI~Editor, you've got to write in your scripts~codings or just parts of them, too, utilizing the GUI~Editor 's scripts which allows for inputting Expressions~Values.
privateer
05 Sept 2013, 15:25I had a play, and it turns out the GUI DOES have a New String List option in the menu following Set Variable. This, naturally, provides the code which you described. So that's handy. I must have missed it because I was expecting it to appear in the top tier menu.
So, both directly and indirectly you have been very helpful. This weekend I shall be making lists. hehe
Cheers
So, both directly and indirectly you have been very helpful. This weekend I shall be making lists. hehe
Cheers

Weezil_Of_Mods
30 Sept 2013, 00:26HegemonKhan wrote:
---------------
about the "get input" script:
this enables the person playing the game to type in their response, which can then be used by the game, through the use of "result" (the thing~word that the person playing the game is set to "result" within its script block).
so, here's how it's done (also see the "character creation" link above for a better guide to follow, lol):
in the GUI (Graphical User Interface) ~Editor:
(this is the noob-friendly windows with the buttons and drop down options)
add a~new script -> Output -> Print a message -> Print [MESSAGE] "What is your name?" ->
Add a~new script -> Output -> get input ->
-> Add a~new script -> Variables -> Set a variable or attribute -> object.attribute = result
object.attribute = result
****************************
object.attribute = result---> (as an example, let's use) player.alias = result
object ---> player
. ---> .
attribute ---> alias
= ---> =
result ---> result
*****************************
as an example, let's use:
player.alias = result
as the player of the game, I'd type in "HK", and the game engine (internally) will then set (understand that) "result" = HK, and so thus this too: player.alias = HK
which I can now use elsewhere:
(an example) Add a~new script -> Output -> Print a message -> Print [EXPRESSION] player.alias + " is awesome!"
which will display while playing the game, as:
HK is awesome!
--------------------------
for doing a menu, you want:
Add a~new script -> Output -> show menu -> (fill in its stuff)
I was actually about to post a topic about what the get input script was when I saw this. Thank you.
HegemonKhan
30 Sept 2013, 00:54lol, I'm surprised you found one of my many obscure (is spelling correct? meh) posts! Thanks for the "thank you", and hopefully that it was helpful for you, too, hehe.
----------
by the way, the "show menu" script does the same thing:
it sets your choice to "result"
for example:
show menu ("What race are you?", split ("human;dwarf;elf",";"), false ) {
-> // internally, the quest engine does this for you: result = your_choice
-> player.race = result // by attaching "race" to the "player" Player Object or any Object (and that Object isn't "removed" or "destroyed", lol), it permanently "saves" this attribute
-> msg ("You're a " + player.race) // which I can than "load" (use~apply) where ever I want, such as but not limited to, here, lol
}
if I chose "human", it'd display: You're a human
otherwise, I could just use a "variable string" instead, by NOT attaching the attribute to an Object, I can use this "variable string" within the same script, but not outside of it within some other script, hence the use of a "variable string" is "local" or "temporary", there's no "saving" of the attribute, as that is done by attaching it to an Object:
show menu ("What race are you?", split ("human;dwarf;elf",";"), false ) {
-> // internally, the quest engine does this for you: result = your_choice
// the "variable string" is in this case autoset as: result
-> msg ("You're a " + result) // which I can than "load" (use~apply) where ever I want, such as but not limited to, here, lol
}
if I chose "human", it'd display: You're a human
however, unlike the "global" or "permanent" or "saving" of using "Object.Attribute=Value_or_Expression", if we used "result" in some other (add) script location, then we'd have an error, as outside of its own script, the variable string "result" no longer equals "human".
examples of variable strings:
(only for "local" or "temporary" or "UN-saved" usage: can only use it within its own script)
(notice how no dot connector is used: no "saving"~attaching~connecting of the attribute to an Object)
variable_string=Value_or_Expression
you_go_first_in_combat = false_or_true
handled = false_or_true
1 = false_or_true
fjklfoi471snfoie = false_or_true
x = 9
10 = a
RRR = b + 8
result = red // this "result" variable string is also used by the "get input" and "show menu" scripts
value = nine
~VS~
examples of Attributes:
("Global" or "Permanent" or "Saving" usage: can be used anywhere and everywhere)
(notice how they DO use the dot to connect~save~attach the Attribute to an Object)
Object.Attribute=Value_or_Expression
(all of the things to the left of the dot are default or custom made~created~added Objects, they're NOT merely variable strings)
player.strength=50
game.turns=0
HK.hit_points="HP: " + HK.current_hit_points + "/" + HK.maximum_hit_points
Weezil.race=human
spell_book.fireball_spell.learn { script } // a Script Attribute
player.wooden_sword.equipped=true
wooden_sword.equipment_slot=right_hand
I can use and alter these anywhere and everywhere, I can put these into any other script location, whereas if I used "variable strings" instead, I'd be limited to that single script block of theirs.
---------------------
"player.wooden_sword.equipped" is the same as:
player (Player Object)
-> wooden_sword (Object)
->-> equipped=true (Boolean Attribute of wooden_sword, and it is set to "true" Value)
"player.jeans.box.ring.material_type=diamond" is the same as:
player (Player Object)
-> jeans (Object)
->-> box (Object)
->->-> ring (Object)
->->->-> material_type=diamond (String Attribute of the "ring" Object, and is set to "diamond" Value)
----------
by the way, the "show menu" script does the same thing:
it sets your choice to "result"
for example:
show menu ("What race are you?", split ("human;dwarf;elf",";"), false ) {
-> // internally, the quest engine does this for you: result = your_choice
-> player.race = result // by attaching "race" to the "player" Player Object or any Object (and that Object isn't "removed" or "destroyed", lol), it permanently "saves" this attribute
-> msg ("You're a " + player.race) // which I can than "load" (use~apply) where ever I want, such as but not limited to, here, lol
}
if I chose "human", it'd display: You're a human
otherwise, I could just use a "variable string" instead, by NOT attaching the attribute to an Object, I can use this "variable string" within the same script, but not outside of it within some other script, hence the use of a "variable string" is "local" or "temporary", there's no "saving" of the attribute, as that is done by attaching it to an Object:
show menu ("What race are you?", split ("human;dwarf;elf",";"), false ) {
-> // internally, the quest engine does this for you: result = your_choice
// the "variable string" is in this case autoset as: result
-> msg ("You're a " + result) // which I can than "load" (use~apply) where ever I want, such as but not limited to, here, lol
}
if I chose "human", it'd display: You're a human
however, unlike the "global" or "permanent" or "saving" of using "Object.Attribute=Value_or_Expression", if we used "result" in some other (add) script location, then we'd have an error, as outside of its own script, the variable string "result" no longer equals "human".
examples of variable strings:
(only for "local" or "temporary" or "UN-saved" usage: can only use it within its own script)
(notice how no dot connector is used: no "saving"~attaching~connecting of the attribute to an Object)
variable_string=Value_or_Expression
you_go_first_in_combat = false_or_true
handled = false_or_true
1 = false_or_true
fjklfoi471snfoie = false_or_true
x = 9
10 = a
RRR = b + 8
result = red // this "result" variable string is also used by the "get input" and "show menu" scripts
value = nine
~VS~
examples of Attributes:
("Global" or "Permanent" or "Saving" usage: can be used anywhere and everywhere)
(notice how they DO use the dot to connect~save~attach the Attribute to an Object)
Object.Attribute=Value_or_Expression
(all of the things to the left of the dot are default or custom made~created~added Objects, they're NOT merely variable strings)
player.strength=50
game.turns=0
HK.hit_points="HP: " + HK.current_hit_points + "/" + HK.maximum_hit_points
Weezil.race=human
spell_book.fireball_spell.learn { script } // a Script Attribute
player.wooden_sword.equipped=true
wooden_sword.equipment_slot=right_hand
I can use and alter these anywhere and everywhere, I can put these into any other script location, whereas if I used "variable strings" instead, I'd be limited to that single script block of theirs.
---------------------
"player.wooden_sword.equipped" is the same as:
player (Player Object)
-> wooden_sword (Object)
->-> equipped=true (Boolean Attribute of wooden_sword, and it is set to "true" Value)
"player.jeans.box.ring.material_type=diamond" is the same as:
player (Player Object)
-> jeans (Object)
->-> box (Object)
->->-> ring (Object)
->->->-> material_type=diamond (String Attribute of the "ring" Object, and is set to "diamond" Value)