Jump to content

Need Help with DialogMenus


Resilient
 Share

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

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

Recommended Posts

actually I wear the object that has the script as a hud, so it does not add my name to the list of detected avatars

i think what i said is right because when people are near me , and the second dialog box comes , my name is not shown on the buttons so i think my name is never saved to the list gAvNames

 

 

secondly, if no one is near me ... my logic says it should tell me that "no one is near me" and the second dialog box will not appear either

 

the second dialog box does not appear but the llOwnerSay function is not carried out

Link to comment
Share on other sites

z is always greater than 0 because sensor event doesn't fire without a detection. for z to be zero you'd be in the no_sensor event... all detection events work this way, if there is nothing detected they don't fire (or fire their no-detection alternates)

  • Like 2
Link to comment
Share on other sites

I just have one final thing with this script that i am stuck with..

 

after a partner accepts , how do i make my avatar dance as well with the hud script? instead of manually selecting the animation from my inventory

 

tried a few combinations of llStartAnimation but it's not working for me.

Link to comment
Share on other sites

sort of.... you can request permissions for one, trigger the dance for that one then immediately request permissions for the next and trigger that one... the only slight problem with that is that it becomes a pain to synch the dances, and to stop it by script you have to re-request permissions from whomever you don't have permissions from.

a few dance balls and chimeras work this way, but most go with multiple scripts so you don't have dialogs for permission on ever change.

Link to comment
Share on other sites

            llRequestPermissions(ToucherID, PERMISSION_TRIGGER_ANIMATION);            llRequestPermissions(llList2Key(gAvKeys,idx),PERMISSION_TRIGGER_ANIMATION); //llList2Keys(gAvKeys,idx) is the UUID of the chosen partner                    }    }    run_time_permissions(integer perm)    {        if(perm & PERMISSION_TRIGGER_ANIMATION) /// If your partner accepted .......        {                        llStartAnimation(llList2String(dances,gChoice)); // This is the particular dance you chose, remember?                                }

 well it does work with a single script but the problem as rightly mentioned in the previous post is in synchronization. What should be the logic for a second script or how do the scripts communicate with each other? Any clues..

Link to comment
Share on other sites

One solution is to have the triggering script process permissions for one dance and then use llGetUnixTime to get the current time (X).  It starts a countdown of, say, 5 seconds and sends a signal to the other script that says "Watch llGetUnix Time and start your animation when it reaches X plus 5 seconds."  The triggering script then has 5seconds in which to do whatever it needs to get and process the second permissions.  When the countdown in both scripts ends, they start their animations simultaneously.

Link to comment
Share on other sites

Another way would be to have a third script that dispatches the getting permissions to the two animation scripts, triggers a signal to start the animation as soon as both sub-scripts got their permissions and in a times interval makes sure the animations are in sync by sending a anim re-start trigger.

The communication wouuld be done using llMessageLinked and link_messager.

Link to comment
Share on other sites

Quite how you synchronise the two animations depends, I guess, on whether you're intending to start both animations simultaneously or to synchronise them if you're already dancing and then invite someone to join you.

Either way, I would have the main script -- the one that handles the sensor and dialog -- also get permission to animate the wearer when it's attached, so that's one less thing to worry about.   Then, send a link message to the second script, when you've selected your prospective dance partner, with the uuid of the avatar with whom you want to dance.  

 In the run_time_permissions event of the second script,  if the invitation's been accepted, start the animation and send a link message to the first script telling it that the invitation has been accepted, so do stuff to start the wearer dancing/synchronise the two, or, if the invitation's been declined,  send a link message to pop up a dialog asking the wearer what to do next.

ETA --come to think of it, probably it would be better, when the second script obtains permission to animate your partner, to have it send a link message to LINK_THIS and then start (or try to synchronise) both animations in the link_message event. 

Link to comment
Share on other sites

  • 2 weeks later...
You are about to reply to a thread that has been inactive for 4620 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...