Jump to content

So is it not possible to have moving functional water?


mindboggles

Recommended Posts

Been looking at moving Placeable water within dungeons, tried scripting it and then a custom animated nif. Did a check of collision, etc. for the animated nif and both the mesh and collision animate as they should but it just doesn't function as water.

 

Anyone have ideas?

Link to comment
Share on other sites

I'm trying to get Placeable water, the water level vary within a dungeon.

 

So you're saying you want the level of the water to change ? Like you look down into a pit ... then player activates something.

And you can watch the level of the water move up as if it was real ... instead of enable/disable different placeable waters ?

 

The reason I mention this ... is a mod I'm going to do with exactly this. But frankly the water moving up/down in couple feet increments is fine for my purposes.

Edited by Mktavish
Link to comment
Share on other sites

  • 3 weeks later...

Well I spent awhile figuring out how to move water up/down. So I thought I would share what I found out and post a template script.

The main problem with moving water (placeable) is that its properties won't travel with it. Meaning you can move the visual water surface. But where the player enters it , starts swiming and breath count starts. Will be at the height where it started. So you have to enable a new water height ... then disable the old. But calling disable on water that has its visual and swimming properties separated , will crash the game. So You must return its surface to the original start location before calling disable on it.

Here is a script you place on something to activate the water change. And place 2 different waters with one of them initially disabled.

Also I'd like to mention , this water does move pretty fast , so I am looking into ways of slowing it down. If extending the time increment beyond .001 doesn't work , which I suspect it won't. I think adding a condition on the move call based on the timer would do it ? Something to step it down to 2 , 3 , 5 times slower than running 1:1

 

 

SCN MyWaterMovingScript

Short Open

Float WaterPosZ ; this is for editing the position of the water
Float Move ; and this is for moving the water
Float StartZ ; this is for returning the water pos before deleting
Float Timer
Float Time ; this gets the timer tor the if timer line

Begin OnActivate

If Move == 0
Set Move to 1

If Open == 0
Set StartZ to MyPlacedWater01Ref.getpos z ; gets the starting z pos so it can be disabled
Set Open to 1

endif
endif

End


Begin GameMode

IF Open == 1

Set WaterPosZ to MyPlacedWater01Ref.getpos z + 1 ; use " - " for moving water down
Set Time to .001 ; this is one value for the speed the object moves

if Timer < Time
Set Timer to Timer + GetSecondsPassed

else
if Move > 0 ; this runs everytime after activated
if Move < 101 ; <<< Water will stop moving here , set this to the Z pos difference between bottom and top+1
MyPlacedWaterRef.SetPos z WaterPosZ ; When this runs the reference moves
Set Time to Time + .001
Set Move to Move + 1 ; repeats steps
If Move > 100 ; <<< Same diff number above - 1... now the water stops

MyPlacedWater02Ref.Enable ; enable the new water height
MyPlacedWater01Ref.SetPos z StartZ ; resets the first water for disable
;enable player controls here if you had to disable them
MyPlacedWater01Ref.Disable
Set Open to 0
Set Move to 0

endif
endif
endif
endif
endif
End

 

Edited by Mktavish
Link to comment
Share on other sites

  • Recently Browsing   0 members

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