Adriana Caligari
Registered User
Join date: 21 Apr 2005
Posts: 458
|
06-11-2005 02:44
Hi have a question.....
I know you can trigger an animation in another avatar by using the sit on code ( ie when sit trigger anim )
But these leaves the "stand up" text at the botome of the screen.
I have seen dance machines in places like the "edge" where you just touch it and dance with no "stand up" - i assume this is placing an anim in the touch_start event.
My question ( at last ) is how do you continue to keep control of the avatar after they have stopped touching ? I figure you have guessed i am writing a dance machine for many people.
Starting one anim is ok - stopping is also oK - but how about syncing and starting other anims (start anim has no key) ?
You could say i am a little lost on this subject so if anyne has any suggestions - or a library script i can look at - or even one (with mod) that i can buy off of you so that i can examine the code - would be appreciated.
Thanks in advance
Adriana
|
Talila Liu
Micro Builder
Join date: 29 Jan 2004
Posts: 132
|
06-11-2005 10:23
With dance machines usually when a user clicks the machine theyir key is grabbed so that dances can be put onn and stopped until the user leaves the dance.
Also the current dance they are on should be stored so it can be stopped and then play the next dance. (Gloabal Variables)
Hope this helps some.
|
Kurt Zidane
Just Human
Join date: 1 Apr 2004
Posts: 636
|
06-11-2005 14:12
check out my property in dari, there is a vending machine for an open scoures dance braclet. BTW: It's easyer to use the string name of an animation to start/ stop an aniamtion, then to try to use keys.
|
Adriana Caligari
Registered User
Join date: 21 Apr 2005
Posts: 458
|
06-11-2005 21:33
hi - thanks for the replies ( i will check out the dance bracele later - hope it is multi user as that seems to be my problem)
I probably worded it badly .. let me explain a little more (also i tried few thngs out yesterday)
A user touches a dance machine - bracelet - club object etc. In the touch_start section the permisions and start animantion are called.
That much i am ok with - then i start hitting my bigest problem. IE
1. How does the uer stop the animation ( yes i can insert stopanimation - bt how do i trap the fact that the user wants to stop - listen wont take effect until Touch_Start -> Touch -> Touch_End have completed. And another touch will just be queued up behind the running one.
I think that if i keep the users in the touch section i wil be able to control them - but need to know how to get outside communication into this section - Have tried replacing a do-while loop with jumps as I know from previous experience that another event will not touch global variables whlst in a controlled loop (i figured a jump loop would confuse SL - but was wrong)
Hope tat explains better - sorry am still trying to work out where the problem lies exactly in my own head - -so writing it down is a bit tricky.
Thanks Again.
|
Kurt Zidane
Just Human
Join date: 1 Apr 2004
Posts: 636
|
06-13-2005 04:05
Well ones you have permission, you can check the status of permission at any time. It's also posable to retreave the key of the avatar said permistions is granted. if permission has been lost, the key call will result in NULL_KEY, and of corse calling the permission will do the same thing. llKey2Name can be used to determine if the avatar is in the same sim.
2nd, scripts can only contain one set of permissions at a time, and can only have permissions for one avatar at a time. That means a script can't have animated bob ok, and animated terrance ok at the same time. But you can have bo, ok to animate,ok to take key control. To get multipel permistions in one script, those permistions have to be asked at the same time.
If you want to have multiple users permissions. You will need multiple scripts, on script for each acatar. from with in a script, sls dose not offer an effective means to dynamically alocate scripts. Unless you plan to res a duplicate of the object as a hole. Witch would probable defeate the perpos of a dance machine.
|