antstubell Posted July 23, 2020 Share Posted July 23, 2020 (edited) Have a lock gate script that works fine except, it appears, that the script is executing a Utility.Wait in conditions that are not met. That's the best way I can explain it. Video link attached and script.In the video you can see that when player activates the lever - not the first time but every time after - that it needs 2 pulls. I am guessing the script is executing a Utility.Wait that I don't want it to. Float Property GateOpening AutoGlobalVariable Property My_GV_LockWater AutoObjectReference Property GateSE1Acti AutoObjectReference Property GateSE2Acti AutoObjectReference Property GateSW1Acti AutoObjectReference Property GateSW2Acti AutoObjectReference Property LockGateCollE AutoObjectReference Property LeverCollE AutoObjectReference Property ValveCollE AutoObjectReference Property LockGateCollW AutoObjectReference Property LeverCollW AutoObjectReference Property ValveCollW AutoBool Property IsEastGate = True AutoEvent OnActivate(ObjectReference akActionRef)If IsEastGate == True && My_GV_LockWater.GetValue() == 1; east gate, water updebug.notification("Cannot Open East Gates At Current Water Level")EndIfIf IsEastGate == False && My_GV_LockWater.GetValue() == 0; west gate, water downdebug.notification("Cannot Open West Gates At Current Water Level")EndIfIf IsEastGate == True && My_GV_LockWater.GetValue() == 0; east gate, water downLeverCollE.Enable()ValveCollE.Enable()GateSE1Acti.Activate(Self)GateSE2Acti.Activate(Self)Utility.Wait(GateOpening); wait for translationIf LockGateCollE.IsEnabled()LockGateCollE.Disable()ElseLockGateCollE.Enable()EndIfLeverCollE.Disable()ValveCollE.Disable()EndIfIf IsEastGate == False && My_GV_LockWater.GetValue() == 1; west gate, water upLeverCollW.Enable()ValveCollW.Enable()GateSW1Acti.Activate(Self)GateSW2Acti.Activate(Self)Utility.Wait(GateOpening); wait for translationIf LockGateCollW.IsEnabled()LockGateCollW.Disable()ElseLockGateCollW.Enable()EndIfLeverCollW.Disable()ValveCollW.Disable()EndIfEndEvent https://onedrive.live.com/?cid=B60C11D037429D8E&id=B60C11D037429D8E%2152845&parId=B60C11D037429D8E%21191&o=OneUp Edited July 23, 2020 by antstubell Link to comment Share on other sites More sharing options...
Evangela Posted July 23, 2020 Share Posted July 23, 2020 (edited) It does look like it's getting hung up on the waits. How long is the wait supposed to be? Edited July 23, 2020 by Rasikko Link to comment Share on other sites More sharing options...
antstubell Posted July 24, 2020 Author Share Posted July 24, 2020 You know what, it typical CK fashion, it now works fine. Just by me going to bed and waking up. The wonders of CK. Link to comment Share on other sites More sharing options...
Evangela Posted July 24, 2020 Share Posted July 24, 2020 That's nice work you got going there by the way. Link to comment Share on other sites More sharing options...
antstubell Posted July 24, 2020 Author Share Posted July 24, 2020 Well it's thanks to you guys that I got back into modding. Here's a compilation of what I've done, just some, there is more.https://www.youtube.com/watch?v=BkxwrfsiDQQ&t=1308s I may post this generally as a thank you. Link to comment Share on other sites More sharing options...
Recommended Posts