How do I create two-word commands

R2T1
I am trying to create a new command - chop, but it won't respond to any synonyms with 2 words. eg. 'chop...' and 'cut...' both work and give the desired response but 'chop down...' and 'cut down...' both fail. see game output below. (same responses for cut)


> chop down trees
I can't see that.

> chop trees
You chop some trees down and produce a pile of logs in their place.



The code I have is...


<command name="chop">
<pattern>chop #object#; chop down #object#; cut #object#; cut down #object#</pattern>
<script>
msg ("You chop some trees down and produce a pile of logs in their place.")
</script>
</command>


How do I set this up for 'chop down' and 'cut down' ? Is it even possible? I can see 'Look at', 'Speak to', etc within Quest, but see their underlying code to determine the correct syntax. (this is in v5.2 & 5.3)

Pertex
Try to change the order of the command pattern:

<pattern>chop down #object#; chop #object#;  cut down #object#; cut #object#</pattern>

R2T1
Thanks.
I tried that and discovered that the scripts only like a single space between the semicolon and the next word. So not only is it the order but look out for those extra spaces.
All working OK now.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums