MesaSolar Posted October 9, 2020 Share Posted October 9, 2020 I'm trying to use a trigger box to change the weather for the player in certain areas. But can't get it to work. Appreciate any help. Followed this tutorial: https://www.youtube.com/watch?v=X59AoDW0-yk and here's my script: Scriptname APWWeatherBlizScript Weather Property APWStormSnow Auto Event OntriggerEnter(objectreference akactionref)if akactionref == game.getplayer()APWStormSnow.SetActive() endif EndEvent Event OntriggerLeave(objectreference akactionref)if akactionref == game.getplayer()APWStormSnow.SetActive(false) endif EndEvent Link to comment Share on other sites More sharing options...
MesaSolar Posted October 9, 2020 Author Share Posted October 9, 2020 Looks like I got it to start by adding "extends objectreference" to the top line. So it starts the weather uponentering the trigger, but the weather continues after leaving the trigger instead of reverting back to the vanilla. How do I fix this? Link to comment Share on other sites More sharing options...
dylbill Posted October 9, 2020 Share Posted October 9, 2020 Using SetActive(False) actually sets the weather active again. The False Parameter says whether the weather is overriding or not. Instead do this: Weather Property APWStormSnow Auto Event OntriggerEnter(objectreference akactionref) if akactionref == game.getplayer() APWStormSnow.SetActive(True) ;overrides weather endif EndEvent Event OntriggerLeave(objectreference akactionref) if akactionref == game.getplayer() Weather.ReleaseOverride() ;release override endif EndEvent Link to comment Share on other sites More sharing options...
MesaSolar Posted October 9, 2020 Author Share Posted October 9, 2020 Using SetActive(False) actually sets the weather active again. The False Parameter says whether the weather is overriding or not. Instead do this: Weather Property APWStormSnow Auto Event OntriggerEnter(objectreference akactionref) if akactionref == game.getplayer() APWStormSnow.SetActive(True) ;overrides weather endif EndEvent Event OntriggerLeave(objectreference akactionref) if akactionref == game.getplayer() Weather.ReleaseOverride() ;release override endif EndEvent Thanks so much! Worked perfectly. Link to comment Share on other sites More sharing options...
dylbill Posted October 9, 2020 Share Posted October 9, 2020 No problem, happy modding! Link to comment Share on other sites More sharing options...
Recommended Posts