Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

30 linked poseballs give content and animate - is this possible?

Sca Shilova
Registered User
Join date: 6 Jul 2008
Posts: 20
07-08-2009 17:26
hi :)

i have 30 pose balls, all containing the same animation - it is a moving crowd.
the pose balls are linked to a frame that is an animated prim moving from a to b.
each pose ball contains:
-a script that a) gives an oufit, b) animates the avatar, and c) sync's all avatars on command
-the animation
-a unique outfit for that specific pose ball

this worked for a scene with different animations where there is no sync and the pose balls weren't linked.

for this scene they are linked but now the script gives the outfit again to each avatar each time someone gets off or on a pose ball. this means that if one avatar gets off and on 60 outfits are offered.

the scripters i am working with cant find a way around this.
is there anyone out there who can?

thanks
sca
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
07-08-2009 18:03
It sounds as if every time there's change&CHANGED_LINK, the script's offering the llAvatarOnSitTarget() a costume.

Off the top of my head, and it's too late at night for me to check, how would it be if you check, in the changed event, if llGetPermissionsKey()==llAvatarOnSitTarget() and only ask for PERMISSION_TRIGGER_ANIMATION if it's not, and then give the avatar for whom it's just acquired the permissions the costume as part of the run_time_permissions event? That way you should only offer the costume once, I think, unless the av gets off and then back on.

The alternative, I guess, would be to have the script keep a list of who it's given costumes to, and only give them once. Then you could reset all scripts at the end of the performance. That way people could hop on and off as much as they liked.

I'm really not sure and I hope someone more expert than I in these matters will offer some guidance, but that's what occurred to me.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
07-08-2009 20:08
have each pose ball track the key of the person thats on it's sit target, when it gets a changed link event, it checks if the stored key is the same as the key that's on it's sit target, if it's new, update it, if it's also valid give outfit, if it's the same, do nothing.

CODE

//-- in globals
key gKeyLast;

// in your working state
changed( integer vBitChg ){
if (CHANGED_LINK & vBitChg){
if (gKeyLast != llAvatarOnSitTarget()){
gKeyLast = llAvatarOnSitTarget();
if (gKeyLast){
//--give stuff/ animate
}
}
}
}
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Sca Shilova
Registered User
Join date: 6 Jul 2008
Posts: 20
thanks
07-09-2009 02:58
that it great
thank you innula and void!
i knew that it must be possible ;)