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:
You'd want to give the hut's exits names, so you can use them in the script. For example
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.