Jump to content

chatable poseball?


kari1sl
 Share

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

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

Recommended Posts



Can anyone point me to a (modifyable) script that will let me chat to my poseball instead of using a menu?
I have lots of poses and the menus are getting unmanageable.
I'd like to write a script that listens for each pose name, finds the coordinates in a notecard and launches the pose in that position.
But, I don't know where to start. An example would help.

Thanks,

25 Jan 2012

Thanks for the suggestions. I agree I need to get permission and listen. Not a problem. But I don't want to simply launch the animation.
I'd like the string heard to (somehow) read the notecard(s) and launch animation in the perscribed orientation - as if using a menu for poses.
I just don't know how to that. It might not even be possible!

Do you know of anything like that?

 

Link to comment
Share on other sites

you will need a listen, and a run time event...

something like this...(umtested)

 

you may want to add a check to see if the animation is in the poseball's inventory

and an on / off switch to kill the listen, if it is something you will leave lying out.

 

integer listen_handle;string pose; default{    state_entry()    {         // Registers the listen to the owner of the object at the moment of the call.                   listen_handle = llListen(0, "", llGetOwner(), "");    }    listen( integer channel, string name, key id, string message )    {        llStopAnimation(pose);        pose = message;       llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);        }     run_time_permissions(integer perm)    {        if (perm & PERMISSION_TRIGGER_ANIMATION)        {            llStartAnimation(pose);            llOwnerSay("animation is:  " + pose);                  }    }       }

 

Link to comment
Share on other sites

  • 2 weeks later...

just for practice....you can mod this to fit your needs :P

wasn't too sure about how you wanted to change the positions...?

 

 integer iLine; integer count; key kQuery; key kQuery2; key kQuery3; integer maxLines; list Heard; string  NC; string Anim; string ItemName; string NCD; string animation; string currAnim;       // Will look for first 2 words chatted: ex: sit sit3, or sit bored
// the first item is the notecard name, the second is the animation in it (no spaces in either)default{ state_entry() { count = llGetInventoryNumber(INVENTORY_NOTECARD); llListen(0, "", llGetOwner(), ""); animation = "sit"; llSitTarget(<0.0, 0.0, 0.6>, ZERO_ROTATION); } touch_start(integer total_number) { } listen( integer channel, string name, key id, string message ) { Heard = llParseString2List(message,[" "],[" "]); NC = llList2String(Heard,0); Anim = llList2String(Heard,1); string ItemName; integer x; for(x = 0;x < count;x++) { ItemName = llGetInventoryName(INVENTORY_NOTECARD, x); if (ItemName == NC ) { NCD = ItemName; iLine = 0; kQuery = llGetNumberOfNotecardLines(NCD); kQuery2 = llGetNotecardLine(NCD, iLine); } } } dataserver(key query_id, string data) { if (query_id == kQuery) { maxLines = (integer)data; } //_________________________________________________ if (query_id == kQuery2 || query_id == kQuery3) { if (data == EOF) { llOwnerSay("None Found"); iLine = 0; } else { iLine++; if( data == Anim) { currAnim = data; key av = llAvatarOnSitTarget(); llRequestPermissions(av, PERMISSION_TRIGGER_ANIMATION); } else { integer z; for(z = 0;z < maxLines;z++) { kQuery3 = llGetNotecardLine(NCD,iLine); } } } } } run_time_permissions(integer perm) { if (perm & PERMISSION_TRIGGER_ANIMATION) { llStopAnimation(animation); llStartAnimation(currAnim); animation = currAnim; llOwnerSay("Current ANimation: " + currAnim); } } }

 

Link to comment
Share on other sites

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