Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Moving an object?

Mister Roo
Registered User
Join date: 21 Jan 2005
Posts: 1
07-24-2005 03:16
Hi everyone,
I am new to scripting and am looking for a very simple script to move an object between 2 coordinates and do this over and over on my land at a slow speed. I guess you would call that a loop, im clueless on how to do this, was hoping someone had a simple script i could work with. Thx for any help

Mister Roo
Minsk Oud
Registered User
Join date: 12 Jul 2005
Posts: 85
07-24-2005 03:59
Have you gotten a single target ala the wiki at_target example working? If you extend that idea to include two states you should be on the right track.

If not, just hang on a few hours and I rather suspect someone will put up a more complete discussion :)
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
07-24-2005 04:46
Physical objects or not? It makes a difference whether they move smoothly (physical objects will) or jerkily (non physical), but also how much they hit the sim (physics is worse).

At it's simplest physics will require llMoveToTarget() and the at_target() events, plus some vector maths if you want it to go a long way, non physics requires the llSetPos() approach and probably more vector maths.

Other options for physics would include llApplyImpulse() which would give you a force to move you the right way, but they you need to get into setting hover heights, buoyancy or other such options.