I’ve made a space station that when a glass window breaks it activates a “Wind” event that sucks the players out (For Multiplayer)
I’m trying to get it to where:
If the glass is broken and the effect is playing, when the blast doors are closed it stops (got all of that part to work) - However, when the doors are opened again by “accident” the Wind effect turns back on. But ONLY if the glass hasn’t been repaired yet.
And if the doors close again, it will of course turn off the Wind that vents you out.
These doors are all over the facility. I imagine I’ll have to create several duplicates for each junction as there is sooo much going on. I doubt integers would work for that bit?
To achieve the desired behavior, you can follow these steps:
Create an event for the glass window breaking that activates the “Wind” event.
Create an event for the blast doors closing that stops the “Wind” event.
Create an event for the blast doors opening that checks if the glass window has been repaired. If not, turn on the “Wind” event.
Create an event for the blast doors closing again that turns off the “Wind” event.
You can use boolean variables to keep track of whether the glass window has been repaired or not. When the doors open, check the value of the variable and turn on the “Wind” event if the glass window has not been repaired.
You can create multiple instances of these events for each junction in the facility, as you mentioned. You can use integers to keep track of the number of doors that have been opened and closed, and use this information to determine when to turn on and off the “Wind” event.
That’s what I figured. I’m still trying to learn how to get things to “check” for other things. I’ll look up some tutorials unless you have further insight. Thank you so much for your response!
IMO You need a search algorithm like BFS / DFS to spread the states dynamically, which would probably mean a module (node) that contains the windows and shared doors across connected modules.