Jump to content

Script to play sound and hold pose on rez?


MashinChaser
 Share

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

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

Recommended Posts

I'm a complete newbie to scripting, and I need to know how to make a script that will play an animation and hold it until derez as well as play a sound on rez once for a cosmetic version of a weapon I've put together. I've got the animation and the sound, and a basic understanding of what I need to make this work (I think): Playsound, playanimation, and on_rez. The problem is since I don't know anything about scripting, I"m not sure how to insert the first two into an on_Rez script. Any help would be greatly appriciated.

Link to comment
Share on other sites

I have a MAC 10 that was entirely free with a script that does exactly that, but any attempts to create a similar script without the other functions (shooting, extending a stock, etc.) have come up with a syntax error. So no, I won't have to pay thousands of lindens for some script kiddie to write me a script. The script I'm referencing holds up the weapon at shoulder level and plays a sound when rezzed/equipped. It keeps that pose in third person (non-mouseview) no matter what you do, and uses animations to do so. I'm not familiar enough with scripting to create something similar, and any attempts have borne no fruit.

Link to comment
Share on other sites

 here are some snippets to get you going? ( this is NOT a complete script)

alot of people post "I'm a complete newbie to scripting"  ...

the first thing is to experiment with the tons of scripts already out there

and not make your first project to be too complicated :)

_______________________________________________

links to the wiki

Events: http://wiki.secondlife.com/wiki/Category:LSL_Events

Functions: http://wiki.secondlife.com/wiki/Category:LSL_Functions

_______________________________________________

string active_anim = " "; // name of anim goes here

string draw_sound = " "; // name of sound goes here

attach(key id)  // << an EVENT
{

if(id != NULL_KEY)  // ask for anim perms wen attached ( not when rezzed on ground)
{ llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
}


else  // when detatched, stop anim
{ llStopAnimation(active_anim);
}


}

run_time_permissions(integer perm)  // << a FUNCTION
{
if(perm & PERMISSION_TRIGGER_ANIMATION)

( llStartAnimation(active_anim);

llPlaySound(draw_sound,1);

)
}

Link to comment
Share on other sites

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