Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Dual controls on one link set

MCM Villiers
Registered User
Join date: 7 Oct 2007
Posts: 39
01-27-2008 08:02
Hey heres the thing, I am trying to make something that can have some1 in mouselook and some1 out of mouselook both be able to control two diffrent things, how would I be able to work around this?
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-27-2008 11:17
2 scripts, llTakeControls will only take controls from one av at a time...
_____________________
|
| . "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...
| -
MCM Villiers
Registered User
Join date: 7 Oct 2007
Posts: 39
01-27-2008 11:45
I've tried that, but if one is in mouselook and one out it doesnt work
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-27-2008 11:54
define "doesn't work" is it defaulting to one av for which state the av is in? try moving the scripts to different prims?
_____________________
|
| . "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...
| -
MCM Villiers
Registered User
Join date: 7 Oct 2007
Posts: 39
new issue
01-27-2008 14:25
I Found a work around...but now i have another issue...I was using llDetectedRot() to turn the prim I was using as a gun like thinggy....now I cant do that since i figured out a way to do it with both of them being out of mouselook.....I Know I have to use llTakeControls and linked messages to get it to the second prim, question is how would I get it to rotate at incriments
CODE

link_message(integer sender_num, integer num, string str, key id)
{
if (id == "2") //dont worry about its how I filtered the control inputs
{
if(num == 256) //what I Got when I pressed left
{
rotation n = llEuler2Rot(<0,0,10> * DEG_TO_RAD);
llSetLocalRot(llGetLocalRot() + n);
}
}
}

I think thats the correct way to do it, but instead of moving in increments its only moving 10 degress
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-27-2008 18:19
you want to multiply the rotation, I'm not sure what it's doing when you add it like that but it's probably the source of your problem

and remember that (increment * llGetRot()) is local rotation (object axis), (llGetRot() * increment) is global rotation (sim axis), so what you'll probably want is

llSetLocalRot( n * llGetlocalRot() );
_____________________
|
| . "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...
| -
MCM Villiers
Registered User
Join date: 7 Oct 2007
Posts: 39
01-28-2008 07:15
From: Void Singer
you want to multiply the rotation, I'm not sure what it's doing when you add it like that but it's probably the source of your problem

and remember that (increment * llGetRot()) is local rotation (object axis), (llGetRot() * increment) is global rotation (sim axis), so what you'll probably want is

llSetLocalRot( n * llGetlocalRot() );

thanks! that works!