Jump to content

Help needed with scripting water


Recommended Posts

I'm working on a mod where I want the water to slowly rise (*SPOILER THIEVES' GUILD* just like it does in a certain part of the thieves' guild questline). Can anyone help me with this? I want a waterplane to slowly increase its z-value. Thanks!
Link to comment
Share on other sites

I wrote a script using SetPosition(X, Y, Z), and then increasing a value. It works, sure, but the water keeps enabling/disabling so fast and it looks terrible! Anyone knows how to make it smoother?

 

Scriptname AAHoSWaterScriptNEW extends ObjectReference

 

ObjectReference Property waterplane Auto

 

float waterplaneZ = 445.7 <-- The starting z-value for the waterplane.

int GoOn = 0 <-- Looks pretty dumb, but I just used it to get the while-loop going. Maybe "while (true)" will work better?

 

Event OnTriggerEnter(ObjectReference akActionRef)

if(akActionRef == Game.GetPlayer()) <-- If the player gets within a trigger, this happens:

while (GoOn == 0)

waterplane.SetPosition(-951.3297, -3063.6487, waterplaneZ)

waterplaneZ = waterplaneZ + 0.1

Utility.WaitMenuMode(0.1)

endwhile

endif

endEvent

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...