|
Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
|
05-26-2007 01:19
I've had a couple of ideas recently for some multiplayer games and other interesting little items, but I'm not entirely sure what the best way to do this would be; Three prims with sit scripts and llTakeControls that send a message to a main one? And that's the best way, how do I ensure that the three sit prims are the ones sat on?
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
05-26-2007 03:59
hmm, can you expand upon what you actually wnat, your post is (To me at least) a little vague.
_____________________
I'm back......
|
|
Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
|
05-26-2007 06:36
Sorry, it's mostly due to the fact that there's a couple different ideas that are varying. Basically, users (2-4, presumably) would all sit, and have their controls taken via llTakeControls. For game uses, each player would have a screen, or a single screen would be used, and each would control a character on the screen - multiplayer. Basically, it takes the control input from more than one person and feeds it into a single item - most likely the parent prim, which then responds. What I'm not sure about is how to ensure that if the first prim with llTakeControls is already taken, the second one is next, then the third, etcetera.
|
|
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
|
05-26-2007 09:37
Each person for whom you wish to take controls must be done with a separate script. Then you need to use something like link_messages to accumulate all control events to a central script, which will process them.
|
|
Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
|
05-26-2007 11:45
Well... Yeah, that's what I said. But how do I ensure that they sit on the right place in the right order?
|
|
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
|
05-26-2007 14:26
As with sitting on a vehicle, unless someone specifically picks one of the sit_target prims to sit on, it assigns people in succeeding link number order to each prim with a sit target.
You can't make it have any other order; ie, you can't always make Joe sit on prim 8 and Nancy sit on prim 12. It is the order that people sit, or if they select a specific seat themselves.
|
|
Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
|
05-26-2007 15:34
So if I put a sit script in, for example, prims 1, 3, 4, and 8, then the first person to sit will sit on prim 1, the second on prim 3, the third on prim 4, and the fourth on prim 8?
|
|
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
|
05-26-2007 16:24
If each specifies a sit-target yes. You can of course have a script which checks which seats are occupied and use llUnSit() to remove someone trying to sit in the wrong place. So if seats 1 & 2 are taken, but I try to sit in sit 4 then I will be forced to stand-up again, but if I then try seat 3 I'll be okay.
_____________________
Computer (Mac Pro): 2 x Quad Core 3.2ghz Xeon 10gb DDR2 800mhz FB-DIMMS 4 x 750gb, 32mb cache hard-drives (RAID-0/striped) NVidia GeForce 8800GT (512mb)
|
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
05-27-2007 04:39
One thing to watch out for is a sit on any of the prims will trigger the changed event in all of them so you need to allow for that in your scripts.
|