Robinsage Posted February 27, 2013 Share Posted February 27, 2013 Ok gang I ran this past the folks on the Bethesda forums but no viable answers yet. I'm thinking what I need to do here is not a possibility. Say I have a large area shaped like a 'T' and want to (for example) make it very dark when the player enters a trigger box formed around the T. Since trigger boxes are square I would have to make two boxes, one for the T's stem and one for the top. Is there a way to link those two trigger boxes together so there is no break (in the darkness) when the player moves from the stem to the top of the T? More detail/specifics in spoiler. This is for the Real Shelter mod. The problem is mainly with irregularly shaped porches, like the one in Whiterun's main square. The way I have it set up now is a box covers each straight porch segment, making two boxes. When the player enters a box it turns off the local (rainy) weather and switches on a no-precip version of that weather and turns on locally placed rain effects. Upon box exit it turns off the rain effects and restores the original weather. So when the player walks from the box in front of Belethor's store into the box in front of the alchemy shop there is a slight transition in sky/effects since each trigger box operates independently. I'd love to find a way to merge the two boxes so they act as one. Link to comment Share on other sites More sharing options...
EnaiSiaion Posted February 27, 2013 Share Posted February 27, 2013 The easy solution would be to put a 0.5 second delay on the OnTriggerLeave event. Just make sure to avoid a race condition (probably requires a global variable). Link to comment Share on other sites More sharing options...
Robinsage Posted February 27, 2013 Author Share Posted February 27, 2013 Thanks, what do you mean by race condition? If you mean entering and exiting the boxes too fast causing stacked weather restorations and timers, that's an inevitability in cities where the boxes can be quite close to each other. Link to comment Share on other sites More sharing options...
starfire42 Posted February 27, 2013 Share Posted February 27, 2013 "Race condition" is actually a technical programming term. It basically occurs when two objects try to change a shared object simultaneously. For example, if you just added a delay to the OnLeave event, you would likely end up with the second trigger to be activated trying to access an effect (the darkness you mentioned) that's already in place. Depending on how Skyrim's internal logic works, the entire game could freeze while the two triggers fight over who gets to create/maintain the darkness. Link to comment Share on other sites More sharing options...
Robinsage Posted February 27, 2013 Author Share Posted February 27, 2013 I see. Thanks for that. I'm going to go the route of trying to use a globalvariable to manage the transitions between boxes. Link to comment Share on other sites More sharing options...
Recommended Posts