Grim Hijinks Posted February 2, 2021 Share Posted February 2, 2021 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 More sharing options...
Fenix Eldritch Posted February 2, 2021 Share Posted February 2, 2021 (edited) 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 February 2, 2021 by Fenix Eldritch Link to comment Share on other sites More sharing options...
Grim Hijinks Posted February 2, 2021 Author Share Posted February 2, 2021 (edited) 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 February 2, 2021 by Grim Hijinks Link to comment Share on other sites More sharing options...
Emma Krokus Posted February 2, 2021 Share Posted February 2, 2021 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 More sharing options...
KT Kingsley Posted February 2, 2021 Share Posted February 2, 2021 Sadly, the changed event isn't triggered by animation state changes. You'll have to poll llGetAnimation in a timer event every couple of seconds. Link to comment Share on other sites More sharing options...
Recommended Posts
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