Elevator Slide possible?

Post » Mon Nov 19, 2012 8:49 pm

Hello I Wanted to know if is possible to create an elevator slide that shifts in diagonal direction bringing on character and or npcs ...

like a kind of elevator , is it possible ? If so does anyoe knows of a script ?
User avatar
Kayla Keizer
 
Posts: 3357
Joined: Tue Dec 12, 2006 4:31 pm

Post » Mon Nov 19, 2012 1:24 pm

It depends entirely on what kind of elevator you want, but, I would think the safest thing to do would be to classify the whole thing as a vehicle / furniture, and possibly use SplineTranslateTo to move it around while actors are attached to it. But I could be way off base.
User avatar
IsAiah AkA figgy
 
Posts: 3398
Joined: Tue Oct 09, 2007 7:43 am

Post » Mon Nov 19, 2012 10:51 pm

Kind of a platform cableway , that can allow moving from a higher point to more down in a valley and back ....
User avatar
Charles Weber
 
Posts: 3447
Joined: Wed Aug 08, 2007 5:14 pm

Post » Mon Nov 19, 2012 12:58 pm

Yeah, use one of the translateto functions, but there's something you need to be aware of... you have to either set it as the vehicle for the actors, or translate them with it. Here's what I learned: you CAN translate objects and their collision meshes, by editing the NIF:
To get Static object collisions to work with TranslateTo (to avoid leaving them behind as you describe), you must edit the bhkRigidBody settings in NifSkope to change:
Layer: Change OL_STATIC to OL_ANIM_STATIC.
Layer Copy: Change OL_STATIC to OL_ANIM_STATIC.
Motion System: Change MO_SYS_BOX_STABILIZED to MO_SYS_BOX.
Also, the static itself must be re-created under MovableStatic in the CK, not the regular Static section

(Source: http://www.creationkit.com/Talk:TranslateTo_-_ObjectReference)

But this does not work very well with anyone riding on it. I made a video in which you can see why (skip to about 1:50):
http://www.youtube.com/watch?v=gsmAN_OzVRg&feature=plcp
Maybe it doesn't demonstrate very well, but if it's faster than the speed of a snail, the collision update will be bugged and you'll easily fall off even if you don't move.

So you can translate the vehicle and the actors at once, and it works fine, but you can't move while that's happening. Same would be true with setvehicle. See example here:
http://www.youtube.com/watch?v=hRyTC_BvZS8&feature=plcp

You will also have to move the NPC actors in and out with a script, because there shouldn't be a navmesh going over the object, or else when it's not there, NPCs might walk over and fall below it, I think.

The difficult part of the script would be referencing all the actors who are going to be on the moving object if you don't know exactly who is going to be on it. This is where SetVehicle would help... perhaps if they walk into a trigger as they get too close, or something.

So, you said you are looking for a script or something... well, what the script looks like will depend on when/how/by whom the elevator needs to be used.

Lastly, I don't really know the difference between TranslateTo and SplineTranslateTo. I've tried them both with various parameters and they seem to result in the same behaviour.
User avatar
Stephy Beck
 
Posts: 3492
Joined: Mon Apr 16, 2007 12:33 pm

Post » Mon Nov 19, 2012 5:37 pm

I can't say I understood what I shoudl to tough :/ ...
User avatar
jaideep singh
 
Posts: 3357
Joined: Sun Jul 08, 2007 8:45 pm

Post » Mon Nov 19, 2012 11:10 pm

I can't say I understood what I shoudl to tough :/ ...

Well, to just move the player and the elevator it is easy. I'll give you an example script, which could be attached to an activator (like an elevator button).
Actor property PlayerRef autoObjectReference property Elevator autoObjectReference property Target1 autoEvent OnActivate(ObjectReference akActionRef)  if ( akActionRef as Actor == PlayerRef )    ;//Player activated the elevator, put the player in the elevator car    PlayerRef.MoveTo(Elevator, 0, 0, 0, false)    ;//Now translate them both to the target ref    Elevator.TranslateToRef(Target1, 300, 0)    PlayerRef.TranslateToRef(Target1, 300, 0)  endifEndEvent

Target1 should be a marker or something that the elevator can move to... this is the easiest way to do it.
The player is moved to the elevator's position first because if they activate it from outside, they would still translate and would go through other objects to get there, or might be floating, or something else.

Also you have to copy a mesh and do the nifskope stuff that I posted before still... if you don't change those, the translation will still work but the collision model will be left in the original location.

Hopefully this helps you understand what to do...

Like I said, the difficulty is in either allowing the player to walk around while it's moving, or every actor/object in the elevator to move with it while not knowing what they're going to be.
User avatar
Kanaoka
 
Posts: 3416
Joined: Fri Jun 16, 2006 2:24 pm


Return to V - Skyrim