Roaming Rooms

I'm working on a proof of concept for a monster hunting game with cryptids and had an idea for Baba Yaga. She'd be encountered in a hut walking around on chicken legs through a heavily forested area. How would I go about making a room that roams other rooms and has an "in/out" exit? Might even have the hut be two rooms, with the second one (kitchen) being only accessible from the first one (parlour) to make things simpler, if that's possible.

I assume it would have something to do with making the hut an NPC and giving it patrols (preferably random ones or maybe even "hunting" patrols if the player makes a deal with Baba Yaga to find certain monsters for them in return for favors or a "hiding" patrol that avoids the players but still allows them to track it down) and then make the NPC also function as a room, but the issue I have with this is that I can't figure out how to make the hut carry the exit with it and activate it in each new room. The "in/out" exit just doesn't show up.

What I am asking for is this:

  1. How can I make a separate room roam through an already established map?
  2. How can I make a room that doesn't roam by itself, but is instead attached to the first room at all times?
  3. How can I give the roaming room a patrol pattern that reacts to NPCs and the player character?
    Any and all help is appreciated.

You'd want to give the hut's exits names, so you can use them in the script. For example hut_exit_in and hut_exit_out. Then you'll want to create a script that runs every time it moves. I'd suggest giving the hut a script attribute named changedparent, because Quest automatically runs changedparent when an object moves.

The script would look something like:

hut_exit_in.parent = this.parent
hut_exit_out.to = this

I'm not sure if the NPC library you're using already has a changedparent script. If so, you just want to add this to the end of it.


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

Support

Forums