Jump to content

Item ground sit script?


Grim Hijinks
 Share

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

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

Recommended Posts

So there's a few scripted things on the marketplace and whatnot that make an item appear for you to sit on whenever you perform the ground sit but I can't for the life of me understand how to do it myself. Any I do own are no mod so I have to do it from scratch but like.. I'm kinda lost I guess? Like is it just something like a transparency trigger + an animation override? I'm a bit of a noob when it comes to all of this

Link to comment
Share on other sites

47 minutes ago, Grim Hijinks said:

Like is it just something like a transparency trigger + an animation override?

That's what I'm thinking, yes. The object in question is probably an invisible attachment with a script which is in a loop, constantly checking to see if the avatar is playing the ground sit animation. When the script does detect the animation, it can change the transparency of the attachment to make it visible and play an appropriate animation to make it look like you're sitting on the attachment. Alternatively, you could set that animation to be your default ground-sit animation with llSetAnimationOverride. You can test this out for yourself with this little demo:

//place the script in an attachment and click it when you're ground sitting
default
{
    touch_start(integer total_number)
    {
        if(llGetAnimation(llGetOwner()) == "Sitting on Ground")
        {
            llOwnerSay("ground sit detected");
        }
    }
}

llGetAnimation is preferable to something like llGetAagentStatus, because the latter can't differentiate between sitting on prims and ground sitting.

Edited by Fenix Eldritch
Link to comment
Share on other sites

Ah so that's the trigger for ground sitting! Okay, so I've tried to do something like this where it triggers off the integer change of that animation but now it's not seeming to want to compile the script, giving the syntax error the "else" line and I'm not sure why.

Quote

default
{
   changed(integer change)
    {
        {
        if(llGetAnimation(llGetOwner()) == "Sitting on Ground")
            llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES);;
        else
            llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES);;
        }
    }
    
}

 

Edited by Grim Hijinks
Link to comment
Share on other sites

25 minutes ago, Grim Hijinks said:

Ah so that's the trigger for ground sitting! Okay, so I've tried to do something like this where it triggers off the integer change of that animation but now it's not seeming to want to compile the script, giving the syntax error the "else" line and I'm not sure why.

 

just a double semi colon

Link to comment
Share on other sites

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