Celty Westwick
Registered User
Join date: 24 Jun 2006
Posts: 145
|
09-28-2009 10:52
I have a large linked object with multiple pose balls. One of these must change the camera controls, but the rest should not. Right now any poseball sat on triggers the camera control change. I need to I think detect and use an if statement in a changed function to make it only occur if that specific poseball prim is sat on. I tried this: changed(integer change) { if(change == CHANGED_LINK) { avatar = llAvatarOnSitTarget(); if(avatar != NULL_KEY) { integer poseball = llGetLinkNumber(); llSay(0,(string)poseball); if (poseball == 68) { llSitTarget(<-0.50,0.080,0.0>,ZERO_ROTATION); llSetCameraEyeOffset( <0.830000, 0.09027, 1.24>);//camera position llSetCameraAtOffset(<2.20, 0.09027, 2.3500>);//Camera point of focus } hide(); llRequestPermissions(avatar,PERMISSION_TRIGGER_ANIMATION); } else { if (llGetPermissionsKey() != NULL_KEY) llStopAnimation(ANIMATION); if(masterswitch == TRUE) { llSetAlpha(base_alpha,ALL_SIDES); } } } } [\CODE]
But sitting on other poseballs still uses the camera settings in this one. Unlinking it would create other problems.
|
EF Klaar
Registered User
Join date: 11 Jun 2007
Posts: 330
|
09-28-2009 12:53
Can you make a seperate script for that poseball alone that controls the camera only?
|
Celty Westwick
Registered User
Join date: 24 Jun 2006
Posts: 145
|
09-28-2009 15:57
Yes indeed it already is in a separate poseball, though all the poseballs are part of one large (250 prim) object
|
Jeredin Denimore
Romani Ite Domum
Join date: 5 Jul 2008
Posts: 95
|
09-29-2009 01:13
The problem is that CHANGED_LINK is simply a notification that the count of prims making up the linkset has been altered, in this case by the addition of the Avatar on the sit target. This notification is sent to the linkset and is fired for all prims with a changed event.
I would use the following in your changed event after checking for CHANGED_LINK...
if (llAvatarOnSitTarget( )!=NULL_KEY) { // take control of camera }
Put this code in the desired poseball and not in the undesired poseball scripts.
|
Celty Westwick
Registered User
Join date: 24 Jun 2006
Posts: 145
|
09-29-2009 07:02
Tried it, but camera control still is active for all poseballs. To be clear i don't want the camera controls to be used for any poseball, but the one in which that particular script is contained. Right now any poseball in the object is affected.
|