Pseudo-code:
If Daytime == 1
scn ibgMirCorrupGateScript; based on MS08FGGateScript; included stuff to make the gate close again. And to play sounds; activated by linked child; activates optionally linked parent after 2 sec delayshort activatedshort openshort nextshort busyshort wantopenshort wantclosedfloat timerfloat closetimerref mySelfref myParentbegin gameMode if busy == 1 if wantopen == 1 set wantopen to 0 set open to 1 playgroup forward 1 playsound3d DRSHeavyOpen01 elseif wantclosed == 1 set wantclosed to 0 set open to 0 playgroup backward 1 playsound3d DRSHeavyClose01 endif if isanimplaying == 0 set busy to 0 endif endif if open == 1if isanimplaying == 0if busy == 0set closetimer to closetimer + getsecondspassedif closetimer >= 10set busy to 1set wantclosed to 1set closetimer to 0endifendifendifendifendbegin onActivate if activated == 0 set mySelf to getSelf; set myParent to getParentRef set activated to 1 endif if isActionRef player == 1 if open == 0 message "This gate is opened elsewhere." endif elseif busy == 0 if open == 0 set wantopen to 1 else set wantclosed to 1 endif set busy to 1 endifend