Hi all. I've recently written some code to lower a water level in a dungeon, which has worked. But while the visible water level drops, the original water collision level seems to remain, so walking through the visibly drained areas is being treated as swimming. There might be an issue with the code I've used that's causing this. Could one of you chaps have a quick look and tell me what I'm doing wrong please?
ObjectReference Property WaterLevel Auto
ObjectReference Property SoundMarker Auto
Bool Property WaterLowered = False Auto
Bool Property WaterDraining = False Auto
Int Property CDTimer = 0 Auto
Event OnActivate(ObjectReference akActionRef)
If akActionRef == Game.GetPlayer()
if (WaterDraining == False)
if(WaterLowered == False)
WaterDraining = True
WaterLevel.Translateto(864.00, -3552.00 , -852.00, 0, 0, 0, 15, 0)
endif
endif
While (WaterDraining == True)
While (CDTimer < 15)
SoundMarker.Enable()
CDTimer = CDTimer +1
Debug.Notification("Water Draining Timer = "+CDTimer)
Utility.Wait(1)
EndWhile
if (CDTimer > 14)
WaterDraining = False
WaterLowered = True
SoundMarker.disable()
CDTimer = 0
Endif
EndWhile
Endif
Endevent
I know its a bit messy, as I've chopped, copied and mangled bits of code from a number of online tutorials to get this working so there's probably an issue there as well