Go to #15
-
Does anyone know how I can incorporate a "go to" function? I want to be able to "go to" a room instead of using cardinal directions. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey, sorry I did not see this until now! Please feel free to tag me @okaybenji with questions. There's a function you can call to move a player to a room called In order to allow the player to go to any room, you would need to either override the existing Here's a simple example. Your player starts in the first room.
Now, if your player enters "goto end", they will be in the last room. Let me know if you have any questions about this. |
Beta Was this translation helpful? Give feedback.
Hey, sorry I did not see this until now! Please feel free to tag me @okaybenji with questions.
There's a function you can call to move a player to a room called
enterRoom
. You just need to pass it the ID of the room to go to.In order to allow the player to go to any room, you would need to either override the existing
go
command, or you could just add agoto
command that lives alongside it. This is the simplest, as you can just useenterRoom
directly.Here's a simple example. Your player starts in the first room.