Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Triggering animations, detecting motion...

Bad Fluffy
Registered User
Join date: 21 Jan 2006
Posts: 13
10-09-2006 19:33
I'm relatively new at scripting, and can't do wildcard searches on the LSL wiki to find precisely what I'm looking for, so I'm gonna ask here...

I've got a basic vehicle script going and I'm trying to make an oriental cart with the driver "seated" in the front, though not actually seated, but will engage in a running animation when the vehicle begins moving, as though pulling the cart.
I'd also been planning on adding idle non-running animations for the driver when the vehicle is not moving, though I'm unaware as to how to get the vehicle to detect whether its moving or not, and whether there are commands to trigger specific animations at those points.
Any suggestions or help would be greatly appreciated, or even just telling me the names of the commands I'm looking for if they exist... I can do my own research. :P
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
10-10-2006 08:43
Try the moving() event.

Actually, for a vehicle it's probably easier to use the control() event. Your script can tell when the vehicle is "off" (because it's receiving no control inputs for most things) and as part of that process set the "idling" anim. If the vehicle will drift to a halt, then you might need moving() though, in combination with control() maybe.
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog