Disabling commands?

Shadecerule
26 Mar 2017, 01:37

Is there a way to disable commands when a particular thing happens?

For instance, if I have:

{command:ask Bob about thing:"Hey Bob, what about thing?"}

Is there a way to later disable this command without going into Bob's Ask/Tell tab and tossing in an "if Bob.askedThing, print nothing" clause? Putting in variables for every command I want to be able to turn off becomes a bit cumbersome.


hegemonkhan
26 Mar 2017, 11:20

you could try... 'delete' or 'remove' Functions... not sure if they only work for the 'Object' Elements or for any Element (as 'Elements' are the internal OBJECTS of quest)

or, maybe there's code for Commands... not sure if it's the 'HandleCommand' code or some other code source/area/file... meh


Silver
26 Mar 2017, 22:42

If you only want Quest to print one thing then something else on all other occasions the easiest way is with the text processor

msg ("{once:this is your first and only reply}{notfirst:you've already asked this}")

Anything more complicated then you'll have to set flags.


Pertex
27 Mar 2017, 09:32

Something like this should work:

{if not Bob.askedThing:{command:ask Bob about thing:"Hey Bob, what about thing?"}}