|
Dmitriy Gausman
Registered User
Join date: 16 May 2007
Posts: 132
|
01-02-2008 14:50
Well I have a scripting dilemma and hope some more creative minds than me can set me in the right direction.
The idea was to have a Capture the Flag event. For this example, the uncaptured flag will be a red box, Let me set the scenario:
Group A can set objects on the land Group B cannot set objects on the land, but will defend the flag Group C cannot set objects on the land and will try to capture the flag
I had hoped to be able to have Group A rez the object, and set the script so that in the event of a collision with someone from Group C only, the box will change from red to black.
This is fine, except I know of not way to physically name a group in the script, in this case Group C. So what happens, is anyone from Group C OR Group B (as they were not the group that rezzed the flag) will trigger a collision and change the flag t black.
So then I thought that I can have the flag on a platform. A judge can determine that the avatar from Group C is standing on the platform and then the Group C avatar can "Take" the object. Here again, I don't know of a way to have someone take the original of an object. I know they can but it and then take it, but that is an extra step I would prefer to enjoy.
If it were possible to script a take on touch, could i make it so that the avatar must be with 2 meters of the object?
The goal is to prevent someone from taking the object from far away by camming in.
Thank you. Dmitriy
|
|
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
|
01-02-2008 15:04
what i would do is have a sensor so that on touch it would activate the action you wont, if they are to far have it whisper or instant message that they are 2 far
|
|
Monica Balut
Beam-Me
Join date: 18 Feb 2007
Posts: 311
|
01-02-2008 16:15
What about using llSameGroup which returns TRUE if the avatar touching or colliding with the object is a member of the same group as the object belongs to. Then set up two SL groups that players join one called Attackers and the other called Defenders. In the edit window of the flag, set the group property to Attackers. Then in the collision event verify that the collision was with someone from the same group.
|
|
Dmitriy Gausman
Registered User
Join date: 16 May 2007
Posts: 132
|
01-02-2008 19:12
I will see how the sensor works. I can't do the idea with SameGroup because the "attackers" or "defenders" group don't have land rights there. Once I reset the group of the object, it will be returned. And I can't add people to the group that owns the land for obvious reasons. It actually would work well if there was only one group to get the flag and no other one to defend it. Then the SameGroup thing would work.
|
|
Okiphia Anatine
Okiphia Rayna
Join date: 22 Nov 2007
Posts: 454
|
01-02-2008 21:31
From: Dmitriy Gausman I will see how the sensor works. I can't do the idea with SameGroup because the "attackers" or "defenders" group don't have land rights there. Once I reset the group of the object, it will be returned. And I can't add people to the group that owns the land for obvious reasons. It actually would work well if there was only one group to get the flag and no other one to defend it. Then the SameGroup thing would work. why not use one group, different roles? There are no 'obvious reasons' if you set roles properly.
|
|
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
|
01-02-2008 23:28
groups will not help in this situation much.
I'd rather have people "sign up" to "groups" or teams by registering themselves with one of two objects. And those then communicate the "teams" to the flag(s) which will then "know" who belongs to which team.
As for people touching the flag... you could make it so the flag follows whomever ran over it for a limited time.
|