Changing Use to Throw

PoochieMoo
09 Jul 2017, 17:15

This may seem like a weird question, but how do I make it so that instead of typing 'use (object) on (object)' I can say 'throw (object) at (object)' and it will yield the same results? Basically I just want to be able to say something other than use but still use the object the same way. I'm in a text adventure.


Richard Headkid
09 Jul 2017, 18:48

Oops, I posted how to THROW object, not THROW #object1# at #object2#, and I can't delete!

Sorry!

(I'll work up a real answer, unless someone beats me to it.)


Yes. What DarkLizerd said in the post below this one:

Make a verb for the object. Then select "Require another object" instead of "Print a message" when the option pops up (just after naming the verb). Then, just copy and paste the script you have for USE into the THROW script.


DarkLizerd
09 Jul 2017, 19:09

Go to the object's verbs tab, add throw...
(should work)


Richard Headkid
10 Jul 2017, 23:30

Finally found an answer to this one.

Create a command.

Command pattern:
throw #object1# at #object2#

Paste this into the code view:
invoke (ScriptDictionaryItem(object1.selfuseon, object2.name))

This will do the same thing as USE OBJECT1 ON OBJECT2.

This will work as long as you've set up the script for use on (other object) for the first item mentioned with the second object mentioned listed as a thing on which you can use the first object mentioned (in other words: you'd have to have use object1 on object2 set up already).


PoochieMoo
11 Jul 2017, 00:56

Thanks!