Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Animations/Movements on a vehicle

Darzus Strutt
Registered User
Join date: 3 Sep 2003
Posts: 67
05-02-2005 02:23
Im looking to create a vehicle like a bicycle or motorbike with animations that change temporarily based on key touches like when u come to a stop u put yur feet down..u turn the avatar leans ..left or right based on the key pressed..and forward the avatar crouches down..is this at all possible and if it is what would i need to add to the script ..llplayanimation?
at each corresponding key press to play that particular animation?
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
05-02-2005 05:57
soulds doable.

http://secondlife.com/badgeo/wakka.php?wakka=animation
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
05-02-2005 11:00
See also:
http://secondlife.com/badgeo/wakka.php?wakka=llRequestPermissions
http://secondlife.com/badgeo/wakka.php?wakka=run_time_permissions
http://secondlife.com/badgeo/wakka.php?wakka=llTakeControls
http://secondlife.com/badgeo/wakka.php?wakka=control

That's a rough flow of what you'd need to do.
_____________________
---
Darzus Strutt
Registered User
Join date: 3 Sep 2003
Posts: 67
05-06-2005 16:12
Thanks that worked ..made some progress with the control functions and animations..challenge im facing now is how to make the animation play only when a key is held down ..for example im turning left or right on the bike/vehicle and the animation i want to play starts..i release the key and it continues to play until I call for it to stop on another key. I s there a way to play only as the key is held down then go back to say the base animation ? I think i have seen it before on some linden vehicles like the snowboards they relesed when the snow sims were released.
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
05-06-2005 18:07
From: Darzus Strutt
Thanks that worked ..made some progress with the control functions and animations..challenge im facing now is how to make the animation play only when a key is held down ..for example im turning left or right on the bike/vehicle and the animation i want to play starts..i release the key and it continues to play until I call for it to stop on another key. I s there a way to play only as the key is held down then go back to say the base animation ? I think i have seen it before on some linden vehicles like the snowboards they relesed when the snow sims were released.

Yeah. This is where "edge" is useful:

CODE
if ( (edge & CONTROL_FWD) && (level & CONTROL_FWD) )
{
// Start the anim, key just now pressed.
}
else if ( (edge & CONTROL_FWD) && !(level & CONTROL_FWD) )
{
//Stop the anim, key just now released.
}
_____________________
Darzus Strutt
Registered User
Join date: 3 Sep 2003
Posts: 67
05-07-2005 02:04
:D kewwl thank s Jill im at work now cant wait to try that out thanks for the help :D