Use item X with item Y

I'm really struggling with getting use item X with item Y to work.

I can do it with a lockable container, and assuming you have picked up the item then it opens, but I would like to be able to make it work with 'use'.

I have a drum kit in the game with only one drum stick. When the player searches in the fridge, they find a large chicken drum stick. They need to use chicken drum stick with drum kit, which should then play the drums.

Would someone mind taking the time to talk me through this please?

Thank you!


if you haven't looked at the tutorial part on 'use/give', this shows how to do it pretty well:

http://docs.textadventures.co.uk/quest/tutorial/more_things_to_do_with_objects.html
(if you need to, you might want to look/go/do through the entirely tutorial if you haven't - highly recommended, or at least a few pages before it, as it continues a bit from those previous pages)

if you have looked at this, and are still confused and need help, then let us know, and we'll help you through it and with understanding it and getting it to work for you.


on the coding side, any action that you want to do involving multiple Objects, is actually using the 'Command' Element.

so, 'use' is a Verb (which is a sub-Command and thus can also use its Command version too, which means that 'use' is specific only to/for that Object it's added within: Each Object can have its own 'use' Verb, but there's only one 'useon' global Command, though Commands can be local to specific Room Objects too... but now we're getting too much into the coding design weeds, unless you're interested, lol)

whereas, 'useon' is the Command

http://docs.textadventures.co.uk/quest/elements/
http://docs.textadventures.co.uk/quest/elements/verb.html
http://docs.textadventures.co.uk/quest/elements/command.html


P.S.

you can always create your own (aka a custom) Command (and also Verbs too) for doing whatever you want with multiple Objects. Ask though if you need help with it, if you're new to coding, as it's a bit confusing.


I had totally missed that bit of the tutorial, thank you! You can now play the drums in the game with the chicken drumstick!


I do have one further question, and I'm sorry if it should be obvious.

Once the drum kit has been played, I'd like it to then reveal a present that can be picked up or is automatically added to the inventory. I think I must be almost there.

I've found the "add to inventory", "object", "object name" and then printed a message, but I have got this in the wrong place as nothing happens once you've played the drums.

Am I going about this in the wrong way?


Ah! I was over complicating this. I've got it. Thank you for your help!


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

Support

Forums