Move object to current room [Resolved]

Hey guys, I have to preface this by telling you that I am completely new to this site and have no experience with writing actual code. I have been using the web-based editor and I have to say that replies that include actual lines of code to accomplish the intended goal will likely be of little use to me.

I have been attempting to nest one object within another so that the former cannot be seen until the latter is looked at. I know that containers accomplish the goal, but they seem rather clunky, especially when the command winds up being "open pile of debris".

My current method is to run a script when the pile of debris is looked at that moves the object "large stick" from a hidden room that I'm using for storage purposes into the current room. However, even with the command set to run, looking at the pile of debris doesn't reveal the large stick even though the script is saying that the stick should've moved into the room. What am I doing wrong?

Quick update. After turning on the "places and objects" tab menu in the game, the "large stick" object appears after the pile of debris is examined, but the game does not display any message regarding the stick having moved into the room. It can be interacted with as normal.

Without the "places and objects" tab active, the large stick object cannot be interacted with even though the source code is the same.

Have you tried setting the 'pile of debris' to be a surface. A surface is still a container, you can change the message too, 'on which there is...' to 'in which there is'.

So what are you wanting to happen? Sounds like all you need is a message to be displayed saying "You found a stick!", which you can add just before or after the script line that moves the object.

By the way, test what happens when the player searches the pile a second time.

Thanks, pixie. That is indeed what I want the game to display, but I'm unsure how to get it to do so. Simply adding a text message won't work because the stick seems to be invisible unless the places and objects tab is on, so I would say "you've found a stick!", the player would say "take stick", and the console would say "I don't see that". I just want the large stick to display the same way upon entering the room as the other objects do from the beginning.

When the player enters this particular room, the console prints the message "you see a pile of debris". The pile of debris is a hyperlink and can be interacted with. I simply want the stick to display the same message, hyperlink and all, upon entering the room. Like so:

"You see a pile of debris"

[Look at pile of debris]

"Looking at the pile of assorted debris, there is nothing of any interest but one object. A large, sturdy branch, rounded at one end. This branch does not appear to have been recently torn from the tree like the others and has likely been here for some time. It is relatively straight and smooth and would make a fine walking stick."
"You see a large stick"


If the stick object's name is actually stick, you can put this:

msg ("You can see a {object:stick:large stick}.")

I set a flag on the sticks and change the description based on that flag.

Thanks guys! The code variations and different methods (moving object, making visible/invisible, etc.) had no effect. Upon typing the command "Look at pile of debris" the game would display nothing at all for some reason. I wound up just taking the easy way out and making the pile of debris a surface with a different prefix for the branch.

Log in to post a reply.