scn MTHAutoCloseDoorTriggerref rLinkedRefBegin onload set rLinkedRef to GetLinkedRefEndBegin OnTriggerLeave if rLinkedRef.GetOpenState 1 ;Door is open rLinkedRef.SetOpenState 0 ; Close endifEnd
And then my other question concerns this script, but it's not working when I tried to add the timer and explosions. Before I created the timer and explosion "section" the disable references were in the "menu" and it worked fine.
scn MTHMetroCenterBombScriptShort iButtonShort ExplodedFloat TimerBegin OnActivate ShowMessage MTHMetroCenterBombMessageEndBegin GameMode set iButton to GetButtonPressed if iButton == -1 ; No button has been pressed yet Return elseif iButton == 0 ; Remove bomb set Timer to 10 set Exploded to 0 elseif iButton == 1 ; Walk away endif if Exploded == 0 if Timer > 0 set Timer to Timer - GetSecondsPassed else MTHBombREF.PlaceAtMe MTHBombFlash MTHBombREF.PlaceAtMe MTHBombExplosion MTHBombSmoke01.Enable MTHBombSmoke02.Enable MTHBombSmoke03.Enable MTHMetroFloodLightGenerator.Disable MTHBombREF.Disable set Exploded to 1 endif endifEnd