Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Help Me With Shield for L$

Atomsk Cult
Registered User
Join date: 17 Jan 2006
Posts: 3
03-25-2006 11:54
I've built a left handed shield, and I need a script that will keep my avatar holding it infront of me. IM me in second life for more details.... Atomsk Cult.
Exile Loudon
Aspiring Scripter
Join date: 10 Dec 2005
Posts: 122
03-25-2006 12:00
That wouldn't be a script; that would be more of an animation. You might want to request a stand Animtion overrider script on the scripting tips forums, and ask for a defense position shield animation in the animation forums :D
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
03-25-2006 12:08
Yeah, the script would be very simple, just get permissions and start an animation on attach.
CODE

state default
{
attach(key id)
{
if (id == llGetOwner()) {
llRequestPermissions(id, PERMISSION_TRIGGER_ANIMATION);
}
else if (id == NULL_KEY) {
if (llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) llStopAnimation("Hold shield");
}
}

run_time_permissions(integer perm)
{
if (perm & PERMISSION_TRIGGER_ANIMATION) {
llStartAnimation("Hold shield");
}
}
}

That's off the top of my head but I've done loads of them, it's a very basic idea, so I'm fairly sure it's right.

(Awaits obvious scripting errors.)

You could go more complex than that of course - say, two different poses, one just casual and one holding the shield in front of you in mouselook.
Atomsk Cult
Registered User
Join date: 17 Jan 2006
Posts: 3
03-25-2006 12:29
Thanks you very much for the help