Question on water logic

Post » Wed Jun 20, 2012 6:10 pm

Hello, so I am doing some testing with water just to see what kind of effects I can possibly create. One thing I have tried is to place a water object next to the player using PlaceAtMe, this works however it simply a floating texture without logic. For example I can walk through the water texture but it doesn't force any type of swimming motion, I simply walk under the water.

So my question is, how does the game know when the user is in or under water to play the water animation? I'd like to be able to mimic this if possible through scripting. I'm guessing part of my problem is that I can't place a WaterType object but instead have to place a Water Activator.

Thanks for any help!
User avatar
Tanika O'Connell
 
Posts: 3412
Joined: Fri Jan 26, 2007 1:34 am

Post » Wed Jun 20, 2012 9:42 am

Well when you use the id of the water body all you're moving is the activator which is already triggered, so the water body underneath will still be in the original spot.
User avatar
sally coker
 
Posts: 3349
Joined: Wed Jul 26, 2006 7:51 pm

Post » Wed Jun 20, 2012 7:50 pm

Interesting, however aren't I creating a new object when using PlaceAtMe so technically there isn't an "original spot"?
User avatar
Destinyscharm
 
Posts: 3404
Joined: Sun Jul 23, 2006 6:06 pm

Post » Wed Jun 20, 2012 9:43 pm

Yes but the water volume isn't attached to the activator, so when you spawn it on your position you're just spawning the activator, the game hasn't told it to activate. You should be able to trigger it in a script though.
User avatar
Isabella X
 
Posts: 3373
Joined: Sat Dec 02, 2006 3:44 am

Post » Wed Jun 20, 2012 4:03 pm

I'll keep trying, I'm pretty sure I tried activating the activator with no result but I'll doublecheck. Thanks!
User avatar
Portions
 
Posts: 3499
Joined: Thu Jun 14, 2007 1:47 am

Post » Wed Jun 20, 2012 6:34 pm

So if you used:

ObjectReference WaterHere = PlaceAtme(,1)WaterHere.Activate(Self)
it should work?
User avatar
joeK
 
Posts: 3370
Joined: Tue Jul 10, 2007 10:22 am

Post » Wed Jun 20, 2012 11:55 am

Ok, so here is what I have been able to find out. Using PlaceAtMe does not work as far as I can tell, it creates the water activator but no logic even when activated. If I use a MoveTo and an existing water object then it DOES work. Afterwards I can use SetPosition, SetScale, etc and everything works as I would expect. The only bummer is the Translate functions don't seem to work. They move the top texture but not the water volume underneath. Thats a bummer because I'm not sure how else to smoothly move the water since SetPosition looks choppy.
User avatar
koumba
 
Posts: 3394
Joined: Thu Mar 22, 2007 8:39 pm

Post » Wed Jun 20, 2012 8:12 pm

There's a quest that does this. Look up the information on TG08 - it looks like it just translates a water plane...maybe translating it is what keeps the area beneath it as water instead of using SetPosition?
User avatar
Cagla Cali
 
Posts: 3431
Joined: Tue Apr 10, 2007 8:36 am

Post » Wed Jun 20, 2012 8:51 pm

Thanks for that extra info, I'll look at that tonight, although translating it for me is NOT keeping the area beneath while SetPosition does.
User avatar
Taylor Thompson
 
Posts: 3350
Joined: Fri Nov 16, 2007 5:19 am

Post » Wed Jun 20, 2012 1:08 pm

You can use:

SendAnimationEvent(Reference, "SwimStart")

You can stop it by doing:

SendAnimationEvent(Reference, "SwimStop")
User avatar
Stephanie Nieves
 
Posts: 3407
Joined: Mon Apr 02, 2007 10:52 pm

Post » Wed Jun 20, 2012 1:22 pm

So if you used:

ObjectReference WaterHere = PlaceAtme(,1)WaterHere.Activate(Self)
it should work?

I ran into a similar problem with this. The code above says "WhateverWaterObject" but I found that which one is important. Even when translating the plane the collision did not move with the water. Once I changed to DG08Water1024 water object everything worked fine. I think which water object is important. DG08 is the quest with rising water so use that one.

Regards
User avatar
Cash n Class
 
Posts: 3430
Joined: Wed Jun 28, 2006 10:01 am


Return to V - Skyrim