|
Jessica Ingmann
Lv. 23 Batcase
Join date: 8 Oct 2005
Posts: 35
|
10-11-2005 03:46
Okay, yet another one.
Using the llCollisionFilter code, is it possible to be able to limit collision commands to just one type of collision? For example, I want to limit collisions on a certain item of mine to just land and avatars.(I guess the latter would qualify as "objects," though.) Or even just avatars. That'd be great. And yes, this is for a game I'm working on. It's basically Sonic the Hedgehog and involves getting the most rings before they disappear. :x
Thanks once more. Your help is always appreciated.
|
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
10-11-2005 04:05
Just call llDtectedType at the beginning of the collision_start(integer count) event to check for AGENT  Land collisions are treated seperately in the land_collision events.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
10-11-2005 04:10
Not directly no. But the various collision_* events trigger the various llDetected* functions. You can use them to distinguish between things, at least a bit, although it's a bit of dog's breakfast.
If you're not expecting LOTS of collisions then triggering a sensor using the AGENT argument from each of the collisions would let you do the right thing.
Grabbing the key then llRequestAgentInformation might also help.
I think the answer's really 'no' but you can bodge something together. Without code:
use a collision start to populate a list with the keys of the detected things. Use that to trigger a single ping sensor with the appropriate filters, populate another list. Compare the two and you'll find which are objects, or agents or similar. It's not pretty, but the collision events only fire 8 times, the sensor 16 times, and you could do a short range sensor so it's not *too* dire.
There might be prettier ways too, but that should work.
|
|
Jessica Ingmann
Lv. 23 Batcase
Join date: 8 Oct 2005
Posts: 35
|
10-11-2005 14:38
From: Jesrad Seraph Just call llDtectedType at the beginning of the collision_start(integer count) event to check for AGENT  Land collisions are treated seperately in the land_collision events. This worked. In fact, it worked perfectly. Now if only I could get the object to lock its X, Y, Z-rotation thingy, I would have the perfect pick-up item launcher. XD Thanks again for your help!
|
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
10-11-2005 14:44
You can prevent rotations by calling llSetStatus(STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z, FALSE); That way if it's a physical object and someone bumps into it, it'll move but not turn. At least that's how I think it works  Edit: Remove the space that the forum insters in there
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
10-11-2005 15:33
The forum software puts a space every 64 characters it doesn't find a space; little white space never hurt anyone. llSetStatus( STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, FALSE);
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
10-11-2005 15:40
OK, I'll remember to inster my own spaces in the future. It's obvious my l337 typing skills are what make me a great scripter.
|
|
Jessica Ingmann
Lv. 23 Batcase
Join date: 8 Oct 2005
Posts: 35
|
10-11-2005 17:22
. . .I love you guys. I truly do. Thank you. ^_^
|