Jump to content

How to move an object around


Lexitus
 Share

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

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

Recommended Posts

I just need some advice on the best commands to do the following.  I have a cute little santa I want to slide down a hill, go back up, and then slide down again.  I would appreciate just some help with what commands should be used.  I will take it from there.  Thank You.

Link to comment
Share on other sites

Sliding downhill is easy.  You don't even need a script unless you want to get fancy.  Any object set to Physical will move downhill if you leave it alone.  The question then is how to keep it from sliding downhill.  You can do that in the simplest case by toggling Physical behavior ON with llSetStatus.

Going back uphill again is also easy, unless you want to be elegant about it.  All you have to do is remember where "uphill" is and then use llSetRegionPos to make Santa go there.  EDIT:  Oh, remember to make Santa non-physical first.  llSetRegionPos won't work on a physical object.

If you want the whole process to be a repeating cycle, you can imagine all sorts of tricky ways to figure out when Santa has reached the bottom of the hill.  Or, you can simply start a timer when he begins sliding and then boot him uphill after X seconds, regardless of where he is.

That's the simplest sliding Santa scheme I can think of, although it's not very elegant.  To make it fancier, try making Santa into a Sled type vehicle.  Vehicle scripts are kind of fun to write, and they have the advantage in this sort of application that you can write them to keep your vehicle from falling over.  I suspect that's going to be a problem with Santa otherwise.  If you go that route, read through the Linden Vehicle Tutorial first.  The parameters that will help keep Santa from falling over are VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY and VEHICLE_VERTICAL_ATTRACTION_TIMESCALE in llSetVehicleFloatParam.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2606 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...