I have these 2 scripts, one is a trigger and the other is a gate.
Trigger:
short triggeredshort DoOncefloat timerref targetref myselfbegin onTrigger player if triggered == 0 set triggered to 1 set myself to GetSelf set target to GetParentRef set DoOnce to 0 set timer to 2 target.SetOpenState 0 endifendbegin GameMode if ( timer <= 0 ) && DoOnce == 0 target.Lock 100 set DoOnce to 1 endif if timer > 0 set timer to timer - GetSecondsPassed endifendbegin onReset set triggered to 0 set DoOnce to 0end
Gate:
begin onactivate if ( getlocked == 0 ) activate endif if ( getlocked == 1 ) message "This gate is firmly sealed." endifendbegin onreset if ( getlocked == 1 ) unlock setopenstate 1 endif if ( getlocked == 0 ) return endifend
The OnReset portion of this script is not unlocking/opening the gate properly. I originally had the on reset in the triggers script but once I found it was not working properly I tried many different things, re-declaring variables cause I figured they weren't being set properly in that block and finally adding the reset to the gate it self but it still doesn't work. =/
Can anyone spot the problem, I am drawing a blank here.