TummaSuklaa Posted August 30, 2016 Share Posted August 30, 2016 (edited) I have a trigger setup where if the player walks through it.. doors are closed and a boss is enabled. But when I walk through it, nothing happens. Event OnTriggerEnter(ObjectReference akTriggerRef) if GetTriggerObjectCount() == 1 if akTriggerRef == PlayerRef debug.notification("I've enter the trigger.") ; The "Front Door" is probably open when the player steps through. So let's close it. if GetNthLinkedRef(2).GetOpenState() == 1 GetNthLinkedRef(2).SetOpen(false) ; Have to make it seem urgent by making this door inaccessible. GetNthLinkedRef(2).Lock(254) else GetNthLinkedRef(2).Lock(254) endif ; The "Back Door" is probably already open. Usually is for me. Let's close it. if GetNthLinkedRef(3).GetOpenState() == 1 GetNthLinkedRef(3).SetOpen(false) GetNthLinkedRef(3).Lock(254) else GetNthLinkedRef(3).Lock(254) endif ; This is the load door leading to the balcony. The door on the left from the "Front Door" GetNthLinkedRef(0).Lock(254) ; Now let's enable the boss. GetNthLinkedRef(1).Enable() endif endif EndEventThe load door, the only door in this room not open by default(obviously) doesn't lock either. Edited August 30, 2016 by TummaSuklaa Link to comment Share on other sites More sharing options...
TummaSuklaa Posted August 31, 2016 Author Share Posted August 31, 2016 (edited) Had Lock confused with SetLockLevel. That didn't solve the problem though. Edit: It all works if I make them objectreference properties, but the whole point of using GetLinkedRef() is to avoid making properties, especially for vanilla forms.. Edit: Had the door linked TO the trigger instead of from it.. but the problem here is, You can only link one reference from another. I need to link three doors. Edited August 31, 2016 by TummaSuklaa Link to comment Share on other sites More sharing options...
TummaSuklaa Posted August 31, 2016 Author Share Posted August 31, 2016 Solved the last problem using GetLinkedRefChain, as doing operations on seperate GetNthLinkedRefs doesn't work on all the linked refs.. and is slower. Link to comment Share on other sites More sharing options...
Recommended Posts