Verb that needs two objects...

RedTulip
07 Apr 2011, 05:00
I am trying to make a 'dig' verb that would need a shovel or an object that can be used to dig something (property), but I don't know how to do that.

Alex
07 Apr 2011, 08:17
One way to do this that would probably be simpler for your players is actually to have the verb require just one object, but then have a script that checks whether the player has something to dig with.

So if there is a "shovel" object and you want the player to be able to "dig ground", then in the dig ground script just check whether the player has the shovel.

Alternatively if you do want the player to be able to "dig ground with shovel" then you need to create a command instead of a verb. You can read about commands in chapter 11 of the tutorial (page 30). You probably want a command template like "dig #@object# with #@digger#", then in your script check whether #digger# is a sensible object to be digging with (maybe give your shovels and spades a "dig" property), then run the appropriate script (you could make it totally generic by giving your objects which can be "dug" an action - not worth it unless you're going to be digging in more than one place though).