Beginner help with exchanging objects

Hi all! I'm super new to Quest and I'm hoping to get a little help.

In my game I've got five objects held by NPCs., which the player need to trade for.

  1. I'd like the first one to be accessed if you know the right word.

  2. For the others if you bring the NPC the correct object, they will give you the one they are holding. If not they refuse.

For number one I think I need to make it a locked container, but I'm not sure how to make a passphrase into a key. I also want to make sure the object can be taken from that container, but no object can be placed inside it.

For giving the object in number two something like
if object =pearl
add pearl to chest
print you hand over the pearl
if object /= pearl
print What do I want with that?

I think I need something like below for taking an object
if pearl is in chest
add sword to inventory
print you obtain the sword
if pearl is not in chest
print you can't take that!

Mostly I'm not sure of the syntax I should use for these. Any help would be much appreciated!


Never mind, I was able to figure it out.


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

Support

Forums