Axe Software Forums
  Quest Developer Forum
  Help with 'define selection' coding


Author Topic:   Help with 'define selection' coding
FeodoricG posted 01-02-2001 23:59 GMT     
Hey, I was wondering if anyone here knows whether I can have the choices in a selection controlled by an 'if' statement. For example, if I want a selection box of what weapon to use, can I code the selection like this:

define selection <my_selection>
info <here is a selection box>
if is <%this_var%;1> then choice <#1>
if is <%that_var%;1> then choice <#2>
end define

I've tried this, but it doesn't seem to work. Will I be able to make this sort of selection, or will I have to think of a new system for my choices?

Alex posted 02-02-2001 10:57 GMT          
This kind of thing is not possible in Quest 2, but it is a possible feature for Quest 3 which I've added to the wish list.

You could use string variables inside your choice tags to give you extra flexibility:

define selection <whatever>
choice <#weapon1#> if is <#weapon1#;gun> then ... else ...
choice <#weapon2#> if is <#weapon2#;bazuka> then ... else ...
end define


etc.

MaDbRiT posted 03-02-2001 13:36 GMT          
Hi -

There are several (mostly rather inelegant) ways to generate a 'selection' list that varies during a game. I've coded up a demo of how a player can have up to four different takeable weapons and how typing 'use weapon' can be made to either use the only weapon he has - or offer a choice of those held.

Hope this prompts a better solution!

You can get my demo from this link:-

http://members.aol.com/agbampton/choices.zip

e-mail me if it needs further explanation.

Al