Hello. It's been awhile so I stopped in to check out all the sweet new Intersect progress. I tested several things that were keeping me from utilizing the engine the way I wanted and almost all of them have been fixed so I'm pretty excited to jump back in. I'm still having trouble with one part in particular though.
I need doors or gates that can be opened/closed to restrict or allow access from both players and NPCs. In theory, this should be very simple but in practice, I don't know what's going wrong. Getting it to work for players is no problem but the NPCs have been stubborn for years now and I just can't get it to work.
I tried having an event "Door" that uses a conditional branch for a global variable as 0 for closed and 1 for open with one page showing the door and the other page a blank image with "passable" checkmarked. This, however, only made NPCs able to walk through the door whether it was closed or open. It's almost like the "passable" flag is getting read on both event pages even though it's only set on one.
I tried having the "Door" event execute a Move Route to grant/restrict "Walkthrough" depending on whether the door was open or closed but this yielded no results.
I tried having the "Door" event use only one page, only existing at all on the condition that the variable is 0 for closed but then the NPCs won't walk through the tile where the event is located, whether it meets the conditional branch or not.
I tried having the "Door" event physically move out of the way and into an adjacent wall via Move Route, like an automatic sliding door, but even with the event physically out of the way the NPCs still path around the door opening as if it were still there.
I also toyed with the idea of using other NPCs to represent the door, spawning in a neutral "door" NPC but there's no way to reliably Despawn a particular NPC. I only see options to Despawn all NPCs. (This idea actually worked well for destructible/repairable walls though, in case anyone needs that)
Now here's the weird part... Sometimes it works.
It's very rare but every once in a while one of these methods will work for like 1 play session. You open the door and NPCs pass through. You close it and they path around. But then the next time I check, it's back to not working. Has anyone else successfully created a door-like event that works for both Players and NPCs?
Question
Ogreleg
Hello. It's been awhile so I stopped in to check out all the sweet new Intersect progress. I tested several things that were keeping me from utilizing the engine the way I wanted and almost all of them have been fixed so I'm pretty excited to jump back in. I'm still having trouble with one part in particular though.
I need doors or gates that can be opened/closed to restrict or allow access from both players and NPCs. In theory, this should be very simple but in practice, I don't know what's going wrong. Getting it to work for players is no problem but the NPCs have been stubborn for years now and I just can't get it to work.
I tried having an event "Door" that uses a conditional branch for a global variable as 0 for closed and 1 for open with one page showing the door and the other page a blank image with "passable" checkmarked. This, however, only made NPCs able to walk through the door whether it was closed or open. It's almost like the "passable" flag is getting read on both event pages even though it's only set on one.
I tried having the "Door" event execute a Move Route to grant/restrict "Walkthrough" depending on whether the door was open or closed but this yielded no results.
I tried having the "Door" event use only one page, only existing at all on the condition that the variable is 0 for closed but then the NPCs won't walk through the tile where the event is located, whether it meets the conditional branch or not.
I tried having the "Door" event physically move out of the way and into an adjacent wall via Move Route, like an automatic sliding door, but even with the event physically out of the way the NPCs still path around the door opening as if it were still there.
I also toyed with the idea of using other NPCs to represent the door, spawning in a neutral "door" NPC but there's no way to reliably Despawn a particular NPC. I only see options to Despawn all NPCs. (This idea actually worked well for destructible/repairable walls though, in case anyone needs that)
Now here's the weird part... Sometimes it works.
It's very rare but every once in a while one of these methods will work for like 1 play session. You open the door and NPCs pass through. You close it and they path around. But then the next time I check, it's back to not working. Has anyone else successfully created a door-like event that works for both Players and NPCs?
Thanks for your time!
Â
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now