Jump to content
  • 0

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


Philip Elegy
 Share

You are about to reply to a thread that has been inactive for 4796 days.

Please take a moment to consider if this thread is worth bumping.

Question

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:

http://wiki.secondlife.com/wiki/Simple_Elevator_in_a_Box

Link to comment
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?

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4796 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...