ask about tell about multiple word objects?

XanMag
10 Aug 2015, 00:53This is a REALLY dumb question, but how do you ask or tell an NPC about something that is more than one word long?
For example: If I want my key to include water, water gun, and pool of water, how do I separate each of those for a separate response? Obviously - pool of water as one key and water gun as another key - won't work. I could ask the NPC about 'of' and get a pool of water response or I get whatever message I entered as my last key if I ask NPC about water.
Equally, as one key entry I, at times, would want to use - old man - as a key, not just old or man. Does that make sense?
It's simple, I know, but I don't know how to do it!
Thanks!
For example: If I want my key to include water, water gun, and pool of water, how do I separate each of those for a separate response? Obviously - pool of water as one key and water gun as another key - won't work. I could ask the NPC about 'of' and get a pool of water response or I get whatever message I entered as my last key if I ask NPC about water.
Equally, as one key entry I, at times, would want to use - old man - as a key, not just old or man. Does that make sense?
It's simple, I know, but I don't know how to do it!

Thanks!
HegemonKhan
10 Aug 2015, 05:21you'll have to use the string ~ char (character~symbol) parsing commands (upon your input string 'result' ):
some of this stuff is a bit fancy~advanced~complex... just a warning...
http://docs.textadventures.co.uk/quest/functions/ (scroll down to the very bottom, the section called 'String Functions' )
and you may want to put your (string) 'result' into a list and~or use the 'for' and~or use 'Instr~InstrRev', to cycle through your (string) 'result', enabling you to use the string~char commands in the link above.
http://docs.textadventures.co.uk/quest/ ... ength.html
http://docs.textadventures.co.uk/quest/ ... match.html
http://docs.textadventures.co.uk/quest/ ... isint.html
http://docs.textadventures.co.uk/quest/ ... ouble.html
http://docs.textadventures.co.uk/quest/ ... meric.html
---------------------
the concept in basic terms:
for example, let's say we got:
(I use 'get input', but the same thing applies for your use of 'ask~tell' )
placement in string ('result'):
0123456789123456789123456789
abc def, ghi, jkl, and mno
then you can use the String Function commands to work with your string ('result'). moving to right~left, replacing a slot with a different character~symbol, removing~adding a character~symbol~slot, starting on the left side, starting on the right side, starting in the middle, etc etc etc
some of this stuff is a bit fancy~advanced~complex... just a warning...
http://docs.textadventures.co.uk/quest/functions/ (scroll down to the very bottom, the section called 'String Functions' )
and you may want to put your (string) 'result' into a list and~or use the 'for' and~or use 'Instr~InstrRev', to cycle through your (string) 'result', enabling you to use the string~char commands in the link above.
http://docs.textadventures.co.uk/quest/ ... ength.html
http://docs.textadventures.co.uk/quest/ ... match.html
http://docs.textadventures.co.uk/quest/ ... isint.html
http://docs.textadventures.co.uk/quest/ ... ouble.html
http://docs.textadventures.co.uk/quest/ ... meric.html
---------------------
the concept in basic terms:
for example, let's say we got:
(I use 'get input', but the same thing applies for your use of 'ask~tell' )
get input {
// I type in: abc def, ghi, jkl, and mno
// result = "abc def, ghi, jkl, and mno"
}
placement in string ('result'):
0123456789123456789123456789
abc def, ghi, jkl, and mno
a:0
b:1
c:2
(space):3
d:4
e:5
f:6
(comma):7
(space):8
g:9
h:1
i:2
(comma):3
(space):4
// you get the idea...
then you can use the String Function commands to work with your string ('result'). moving to right~left, replacing a slot with a different character~symbol, removing~adding a character~symbol~slot, starting on the left side, starting on the right side, starting in the middle, etc etc etc

Pertex
10 Aug 2015, 06:36remove the blanks from the keys. poolofwater and oldman should work