Scripted Object-Movement

Post » Wed Dec 15, 2010 8:05 am

Is there an easy way to create a script which moves an object (smoothly) forward? I just want to move a platform moving forward along one axis (and the player is supposed to be able to stand on it and move with it ;) )
I really don't know how to do that.. :facepalm: perhaps I need a little help to get started with it. :rolleyes:
User avatar
Matt Bigelow
 
Posts: 3350
Joined: Sun Sep 30, 2007 6:36 pm

Post » Wed Dec 15, 2010 10:34 am

You could use something like this:

float xmovset xmov to getsecondspassed * 100 ; 100 is the movement in units per second, can be anything of courseset xmov to xmov + getpos x ; in this example the object will move along the positive direction of the x axissetpos x xmov


Needs to be on the object itself, otherwise you need a persistent reference and change the script accordingly (like ref.getpos x instead of just getpos x).

The biggest problem is the collision. I think there are some disable/enable tricks to make the collision move with the mesh, but the easiest way would be to copy animated collision from one of the animated Beth nifs to your object.
User avatar
Louise Dennis
 
Posts: 3489
Joined: Fri Mar 02, 2007 9:23 pm


Return to IV - Oblivion