Jump to content
You are about to reply to a thread that has been inactive for 4292 days.

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

Recommended Posts

Posted

So, what I have figured out to do is, linking my animation to play when I click an object. Example; I click on the sword currently sheathed and the animation plays; Now what I want is for that sheathed sword to now be in the right hand of my avatar and to stay there after the animation has finished. I'm no script genius, only been learning for about 2/3 days on and off and I'd really appreciate help, I've tried google and the answers aren't intuitive enough as most of it is just the scripting language which I'm not at all familiar with yet, I can post the script I have if it's needed for you to help me fix my issue. I create my own models, animations but now I've trying to step onto the bigger problem which is scripting, I am watching a tutorial but I need to get this sword finished quick, free copy of the sword to the first person who fixes my issue.

Posted

Usually this is achieved by having two attachments, a drawn sword permanently attached to your hand and a sheathed sword permanently attached to your side.   

Normally, the draw sword in your hand is invisible, completely.   Then when you come to draw it, you toggle its visibility on and the visibility of the sheathed sword off (leaving the scabbard visible, of course), so it looks as if you've drawn it.   When you've finished, play a sheathing animation and switch the visibility back.

The commands you'll need to look at are llSetLinkAlpha, I think, for switching the visibility, and maybe llRegionSayTo for communications.   Any message sent using llRegionSayTo(avatar, channel, message) will be heard by that avatar's attachments (and only that avatar's attachments -- no one else's) that are listening on the right channel.

ETA -- I was sure there was an example somewhere.   This, by Darrius Gothly, is, as the name suggests, for a gun and holster.  It will work, however, just as well for a sword and scabbard: Gun and Holster.

Please note that switching the visibility is all it does.  You will need to add the functionality to play animations, cause damage and so on.

You are about to reply to a thread that has been inactive for 4292 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
×
×
  • Create New...