Custom responses
Deckrect
30 Jun 2016, 17:27Hello, people.
I have been working on some customized responses for selected commands in the game, like when player picks or drops something and the like. However, i have a set of bones which should not be disturbed. I want the game print a massage like "It is not wise disturbing the bones" but i have no clue where placing it. Actually, the only thing i want player doing is "Look at bones", and it is already set. I cannot use the verb tab, because take is a verb already in use by Quest core. So, how may i solve this specific case?
I have been working on some customized responses for selected commands in the game, like when player picks or drops something and the like. However, i have a set of bones which should not be disturbed. I want the game print a massage like "It is not wise disturbing the bones" but i have no clue where placing it. Actually, the only thing i want player doing is "Look at bones", and it is already set. I cannot use the verb tab, because take is a verb already in use by Quest core. So, how may i solve this specific case?
The Pixie
30 Jun 2016, 19:05Go to the third tab (Inventory I think?), and there you can control what happens if the player tries to take the object. Set it to be not takable, and give the message. If that is not quite right, set it to Run script, and then you have full control (in this case, just print a message, I guess).
Deckrect
30 Jun 2016, 19:14Hmmm... Thank you, Pixie! I assumed the massage were only displayed if the object may be taken. This was great!
HegemonKhan
01 Jul 2016, 03:40Commands, Verbs, the 'switch' Script/Function, the 'if' Script/Function (the 'else'), and etc, all have 'failure" text/error code boxes/Attributes for you to put in what you want:
http://docs.textadventures.co.uk/quest/ ... mmand.html (see 'unresolved')
http://docs.textadventures.co.uk/quest/ ... /verb.html (see 'unresolved' ... hmm I thought using: <defaultexpression>xxx</defaultexpression>, worked too... hmm, meh)
http://docs.textadventures.co.uk/quest/ ... witch.html (see 'default { }')
etc etc etc
http://docs.textadventures.co.uk/quest/ ... mmand.html (see 'unresolved')
http://docs.textadventures.co.uk/quest/ ... /verb.html (see 'unresolved' ... hmm I thought using: <defaultexpression>xxx</defaultexpression>, worked too... hmm, meh)
http://docs.textadventures.co.uk/quest/ ... witch.html (see 'default { }')
etc etc etc
Deckrect
01 Jul 2016, 13:23I am almost understanding about commands and switch.
I already put a command working right. Now I must study more of the switch thing, because seems in many places I should be using this instead of if.
I already put a command working right. Now I must study more of the switch thing, because seems in many places I should be using this instead of if.
HegemonKhan
01 Jul 2016, 14:22'switch' and 'if~else if~else' are really the exact same thing, merely with different designs/looks/structure, but sometimes depending on factors one of them is more aesthetic than the other, sometimes 'if' is more organized/nice-looking and sometimes 'switch' is. I don't think quest has the functionality of 'switch' that you see in other/main languages, but maybe it does... no idea.