Cloning Objects #148
-
|
Hello all! I have run across this error when trying to use clones: 6960133
The idea is to have a clone in my starting room. This code shows a torch in the room items list, but not on the panel to the left, and when I type "l torch," it shows up in the side panel, but I get the message "There doesn't seem to be anything you might call 'torch' here." I must be misunderstanding how the clones are intended to function somehow. As I'm trying to code some functionality into the prototype, it seems like I should understand where and how add them to the world in order to continue functionality testing. Any help would be welcome! Thank you all in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
|
Hmmm... I'm having the same issues when I try. It isn't showing up in the pane for me because I am cloning the object into the starting location after play begins. Entering a command updates the pane. Just add this after cloning the object to update the items in the panes: ...but I can't interact with my cloned object, either, as if it weren't in scope. Still testing... |
Beta Was this translation helpful? Give feedback.
-
|
I don't know, I can't make it work either. |
Beta Was this translation helpful? Give feedback.
-
|
Hmm... If I move the clone to the player ("me") instead of the room, everything works. |
Beta Was this translation helpful? Give feedback.
-
|
As @KVonGit said, the issue seems to be cloning the object into the starting room. |
Beta Was this translation helpful? Give feedback.
As @KVonGit said, the issue seems to be cloning the object into the starting room.
io.updateUIItems()will update the side pane, but we also need to update the world so that it knows about the clone. The full setup function would look something like this: