Skip to content
Discussion options

You must be logged in to vote

That's a clever solution, I like the user experience of allowing the player to type go to farmhouse or go to silo. Simple and easy to understand.

Both exits would technically be "in" from Zeke's Farm. The "in" exit could be a script that asked "Do you want to go into the farmhouse or the silo?"

I did try to come up with a solution that went in this direction, taking inspiration from the section on simpleUse() on this page. Basically, we create a subclass of Exit that can be passed an array of rooms. Then when the player uses the exit, we ask which room they want to go to and "create a disposable exit on the fly" with the selected destination.

// code.js
class MultiExit extends Exit {
  …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@KVonGit
Comment options

@KVonGit
Comment options

@ThePix
Comment options

@KVonGit
Comment options

Answer selected by KVonGit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants