Jump to content
  • 0
Sign in to follow this  
Philip Elegy

Why won't my elevator take my avatar with it?


6 answers to this question

Recommended Posts

  • 0

If the elevator is not the type that requires the avatar to sit on a pose ball before the elevator moves, then you're trying to male a "Physical elevator", and the script needs to set physics to TRUE for the elevator car just before it moves, and then set physics to false when the car stops. Also, loop the llSetPos command to move the car in small increments, and you'll get a better-working elevator.

Here's a link to a page in the archived scripting library from the old forums, for a physical elevator script:


Share this post

Link to post
Share on other sites
  • 0

There are (usually) two types of elevators in SL. The sort that an avatar sits on and the sort that push an avatar around. You haven't clearly said what type you are making. I'm going to guess that you mean the second type and try to explain why it's not working.

Your elevator probably moves with code something like this, llSetPos(llGetPos() + <0,0,10.0>);. That code snippet should move the elevator 10m above where it is currently located. To be clear, the elevator doesn't actually go up 10 meters (like in the real world) with that code snippet. The elevator simply ceases to be at it's current position and is instead instantly 10m higher. Your avatar (standing on it) would no longer be standing on anything because the elevator simply ceased to be where it was. For example:

Say the elevator is at <128.0, 128.0 20.0> on the ground.

Your avatar standing on it would be at (approximately) <128.0, 128.0, 21.0>.

The script sets the elevator position (using my code snippet above) to <128.0, 128.0, 30.0>.

Your avatar is still at <128.0, 128.0 21.0> with nothing under it. So, it falls to the ground.

This happens because llSetPos() doesn't move the object through all points in space between the current position and new position, it simply changes the position in a single jump.

This doesn't fix your problem, but does (hopefully) explain why it's not working.

To make things even worse (as far as understanding goes) there are three type of objects (that I know of).

There are physical objects affected by the physics engine (check the "physical" box in the object editor to make it physical). These objects will fall to the ground and get pushed around if you walk into them. When walking around, your avatar is a physical object.

There are non-physical objects that aren't affected by the physics engine. This is the default when you create an object. They won't move when you walk into them, they will stay where you put them (won't fall) but they will affect physical objects (you can stand on them). Most often when your avatar sits, it is in this state.

And there are phantom objects. A phantom object is similar to the non-physical object except you can walk through it and it doesn't affect physical objects. Check the phantom box in the object editor to make an object phantom.

Fun, huh?

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...