Wolfstorm Posted November 23, 2023 Posted November 23, 2023 Or I'm doing something wrong? There are two statues, set with initially disabled. Then you have two levers, each lever enable one statue. Then you have a pull-bar, to open a gate. The gate will only open if the two statues are in place. So you pull the two levers, use the pull bar and that's it, gate opened. But Papyrus is not recognizing the IF. It just open the gate already at start, with or without the statues in place, it makes no difference. Here is the script: Quote Scriptname PuzzlePullBar extends ObjectReference ObjectReference Property Object1 Auto ObjectReference Property Object2 Auto ObjectReference Property Gate Auto Event onActivate (objectReference triggerRef) If (Object1 == IsEnabled() && Object2 == IsEnabled()) Gate.SetOpen() Endif EndEvent Removing the ( after the IF had no effect. Using "and" in place of "&&" will not compile. The SetOpen works both with a door, a gate, or a traplinker (for gates that uses movable spikes).
dylbill Posted November 23, 2023 Posted November 23, 2023 This is a syntax error. I'm actually surprised it compilied. You're using IsEnabled not on object1 or object2, so it checks if the PuzzlePullBar is Enabled. it should be: If (Object1.IsEnabled() && Object2.IsEnabled())
Wolfstorm Posted November 27, 2023 Author Posted November 27, 2023 Thanks for the information. The script did work now.
Recommended Posts