Jump to content

The Perfect Avatar Posing Attachment (or, OpenCollar without the collar part)


Sion Pearl
 Share

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

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

Recommended Posts

I'm lazy. I have a bellybutton ring I made and what I wanted was a thing that I could use to apply poses to my avatar for photos without needing to rez a pose stand or go to my inventory.

So what I did was make a tummybutton ring and put opencollar scripts into it, plonk, like that, because opencollar has this awesome thing where you can apply poses to your av through menu and chat commands, and if you take out the creepy SnM poses and put in model poses, it's pretty cool, and it's got some (admittedly rather clunky) couple anims too, if you want to kiss or hug someone. 

But the thing is, that's not idea because I don't use an RLV-enabled viewer, which means the thing is sub-optimal in terms of my client's framerate (and, I suspect, general lag too, although I don't know that for sure), and because there are piles of scripts in it that I have no intention of ever using (leash, for instance, or owner, or any of the rlv stuff that I can't use anyways because I am using 2.6, or the thing that asks the OpenCollar servers for updates).

Question then is, to what extent is it possible to strip scripts out of an opencollar attachment? I mean, can I just delete the ones that I don't want  (leash, update, the RLV ones) and leave the ones I do want (anims, menu) or are they all interconnected? Will deleting scripts without editing the remaining ones break the thing? What can go? What can't?

Or is there an easier option for the non-proficient scripter?

Link to comment
Share on other sites

I don't know OC good enough to be able to tell how difficult it would be to cut out the stuff you don't want - but I'm almost sure, it's easier to either:

  • look for an animation player (I don't know if this is the right word) - there should be some out there - free and paid

or

  • write your own little thinggie

I don't know what your ambitions scripting wise are, but it's not complicated (at least playing animation on your avatar) and you know where people would gladly help you.

Link to comment
Share on other sites

Well, all I'm really after is a thing that I can type a chat command into or get a menu for, or both, and it'll pose me.I have other stuff that'll do hugs and stuff, so although they're nice, I can dispense with those.

The way OpenCollar works is that if you click the device or type /1 xxmenu into chat, where the letters xx are your initials, you get a hierarchical menu (the top-level buttons are animate, leash, rlv, owners, help/update, add-ons, some others), or you can type /1 xxnameofanimation and bang, you play the animation.

My scripting skillz are, as you are probably aware right now, so basic it's not even funny. An attachment version of Rolig Loon's Multipose Stand might be adequate, actually, but I am not sure I know how to convert that.

Link to comment
Share on other sites

This seems like a good starting point - it really isn't difficult - what you need is:

  • an object - an attachment or a pose stand to sit on are equally suitable for this
  • the capability to play animations: For this this object has to ask permission to play animations and to actually play them once it has it (the actual function simply is llStartAnimation())
  • a listener that listens to you saying what should be played or show a menu (which in technical terms is a dialog)
  • a touch event that opens the afore mentioned dialog
  • a mechanism to get the available poses either by going though the inventory and see which ones are there or from a notecard to show the animations on the dialog

Very roughly speaking, this is it. To adjust Rolig's Pose Stand, you would have to:

  • change the permission requesting mechanism, since in your case it's an attachment and not something you sit on
  • add the dialogs

See - it'sa very simple ;)

Link to comment
Share on other sites

Well hows about using one of these dance-chimeras, some are free and u can strip off the crappy dances to replace with your animations. A few of them use menus, others chat-commands, to select animation.

Animation-Overriders where you can switch thru poses could do the job too. Need some research but i bet you´ll find something.

Link to comment
Share on other sites

 


Darkie Minotaur wrote:

Very roughly speaking, this is it. To adjust Rolig's Pose Stand, you would have to:
  • change the permission requesting mechanism, since in your case it's an attachment and not something you sit on
  • add the dialogs

 

 

I shall have to find out how to add dialogues. As for the permission requesting mechanism, am I right in thinking it's to do with this line: 

 

agent = llAvatarOnSitTarget();

But what to? And I am right in thinking this bit should be deleted?

	run_time_permissions(integer parm)
{
if(parm == PERMISSION_TRIGGER_ANIMATION)
{
llStopAnimation("sit");
llSetAlpha(0.0,ALL_SIDES); //Make the pose stand invisible
llSetObjectName("");
llStartAnimation(CurrAnim);
And...
Link to comment
Share on other sites

This line:

 

agent = llAvatarOnSitTarget();

 

 

has to do with the fact that it's a pose stand and you sit on it. In the change event, you check if the object is attached, rather than sat on (that's what the quoted line does). The attach event has an id parameter - if this is not a null key, it's attached.

Inside the attach parameter, you can get the permission:

 

attach(key id) {    if(id) {		llRequestPermissions(id, PERMISSION_TRIGGER_ANIMATION);    }}

 The run_time_.permission event is triggered when the permission changes - Rolig uses it here to make sure that the permission to trigger animation has been granted.

If you do it that way, you should request the permission each time you select an animation. You wouldn't use the attach event to request the permission. Instead, you would call llRequestPermission() as soon as you want to start an animation - e.g. after saying the name of an animation:

 

listen(integer channel, string name, key id, string message){	if(llGetAttached()) { //check, if the object is attached		anim = llStringTrim(message, STRING_TRIM);		llRequestPermissions(id, PERMISSION_TRIGGER_ANIMATION);	}}run_time_permissions(integer parm) {		if(parm == PERMISSION_TRIGGER_ANIMATION)		{			llStopAnimation("sit");//you don't need this, since the ava doesn't sit			llSetAlpha(0.0,ALL_SIDES); //you don't need this, since you don't have a pose stand			llSetObjectName(""); //I'm not sure why Rolig uses that - but you don't need this			llStartAnimation(anim);		}}

 

 

To explain:

 

  • listener hears something and checks if the object is atttached - if yes ...
  • .. listener hears a string, trims off any needless blanks at the beginning or the end
  • the received string is assigned to the variable anim (is a global variable)
  • permission to trigger an animation is requested
  • if the permission is granted, the run_time_permissions event is triggered
  • animation is played

 

Link to comment
Share on other sites

Geez, you guys have been busy while I was sleeping.  :smileytongue:

Sion, as you've discovered, there's nothing magical about standing that makes a pose stand work.  You can trigger the poses any way you like.  Darkie's got it working here.  If you want to add dialogs, one of the best tutorials to get you up to speed is THIS ONE.  I also recommend learning how to fly Void's Multipage Dialog system, which makes it easy to daisy chain one dialog into another and keep the buttons organized.

@Darkie ... The line that says llSetObjectName("") is there to suppress the object's name in chat.  You'll see that wherever there's a llSay it starts with /me to complete the process.

Link to comment
Share on other sites

Thanks, everyone.

I must admit that I struggle with the concepts sometimes, but thank you for your patience. I'll have a fiddle about and see what I come up with.

Innula sent me a HUD inworld a little time ago that I am also having a tinker with. It's all very interesting.

Link to comment
Share on other sites


Sion Pearl wrote:

((By the way, I appreciate that I'm kind of leeching off the community here. Hopefully other folks'll get stuff out of this exercise and I'll eventually learn enough to start giving back. :robothappy: ))

I think I speak for most of us when I say that's more or less what we're here for :-)  We all started programming, if not scripting, the same way.  You are putting in enough effort and explaining your issues in enough detail that we aren't just doing it for you so, yes, we hope you and anyone else will learn from this.  Continued good luck.

Link to comment
Share on other sites

 


PeterCanessa Oh wrote:

I think I speak for most of us when I say that's more or less what we're here for :-)  We all started programming, if not scripting, the same way.  You are putting in enough effort and explaining your issues in enough detail that we aren't just doing it for you so, yes, we hope you and anyone else will learn from this.  Continued good luck.

seconded

 

Link to comment
Share on other sites

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