Making wearable items with an automatic pose

Joined
Oct 20, 2018
Messages
6
Location
The Void
Okay, so, I have no clue if there's a special area I should put this, if it is feel free to move it.

I've been fiddling with making items for a roleplay sim I'm a member of. Some of the things I want to make for it are wearable items and I would like to include poses (full perm from the marketplace) that automatically trigger when they're attached.

Problem is, I have literally no idea how to do this. Anyone know how that can be done? Is there some script I need?
 

Peony

The lurker in her natural habitat.
Joined
Sep 22, 2018
Messages
22
Location
Oz
SL Rez
2007
Okay, so, I have no clue if there's a special area I should put this, if it is feel free to move it.

I've been fiddling with making items for a roleplay sim I'm a member of. Some of the things I want to make for it are wearable items and I would like to include poses (full perm from the marketplace) that automatically trigger when they're attached.

Problem is, I have literally no idea how to do this. Anyone know how that can be done? Is there some script I need?
Yeah, you’ll need a script for it. If you’re only using the one pose/animation in the item, then you could probably find a simple script for free - I think I found one by googling something like “animation script SL”. ETA: here’s a basic script with lots of helpful comments so you can learn what the script is doing: SoloMornington/Solos-Script-Repository

If you’re wanting to choose different poses, then it might be a little trickier to find the right script, but there’s bound to be something out there.
 
Last edited:
  • 1Like
Reactions: MonochromeReflections

Qie Niangao

Coin-operated
Joined
Sep 25, 2018
Messages
21
SL Rez
2006
Of possible future interest, there's a Scripting forum but that's really more about writing your own scripts.

Just being paranoid, you'll want to be very sure that you only distribute these full-perm animations with appropriate next-owner permissions (which usually aren't full perm, in which case there'll be some sort of EULA specified).

Couple technical details that may or may not apply here:
  • If the animation to be used should temporarily replace the basic avatar animation (e.g., crouch instead of stand), the script would need to stop the replaced animation, or the replacement animation would need to be higher priority and affecting much of the skeleton. (This amounts to a specialized "animation override" script, in contrast to one that just pushes a single high priority anim such as "drinking" on top of whatever the avatar is already doing.)
  • Usually the trickiest part is getting the prop attached in the first place. Because this is a roleplay sim, it may be that you're already using a custom Experience, which can make the attachment process totally seamless. You can also do this with the commonly pre-approved AVsitter Experience, especially on non-roleplay regions with no need for a custom Experience. Even with no Experience at all, you can use llAttachToAvatarTemp() to avoid the user having to fumble with the prop as it passes through their inventory. (Unfortunately, they still need to own the item for the time it's attached, so that means you'll still need both Transfer and Copy permissions on the prop and all its contents -- which is probably fine here but again, be careful of those next-owner perms.)
 

Fionalein

an old grumpy cat
Joined
Jul 30, 2019
Messages
1,849
SL Rez
2017
Do get some scripting friends have a look over your items though. There are free "play animation upon attaching" scripts out there but no one needs another crappy item that stops all your AOs upon detaching... - the script can play one animation at a time and it should stop exacly that one animation upon detaching, no more, no less. Ideally the item should also resume the animation on it's own after "stop all animations" got used, as most AOs nowadays do.

An item could even automatically try to regain permissions once revokend via avatar heath, but I am not sure that is a good idea (you can always detach and reattach in severe cases of animation mangling).