find groups w/ scripts
|
Phil Metalhead
Game Foundry Leaɗer
Join date: 11 Mar 2003
Posts: 291
|
04-26-2003 00:59
what i would like to see is a function to get an avatar's group, something like string llGetAvatarGroup(key avatar)
returns a string with the name of the group the avatar specified by avatar is currently active in. if the avatar is not in any group, returns a null string. another function might be (although i would want llGetAvatarGroup more) string llGetGroup()
returns a string with the name of the group the object's owner was in at the time the object was rezzed. (or whatever the "Group" tag in the Object's properties is representative of) -- this should be easy to code, because the object's properties already have this string stored in them. this way i could have touch script (or listen scripts, or, or, or...) objects that are only responsive to people in my group, without having to create a massive list of everyone permitted to use it, and a for loop to process the list 
|
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
|
04-26-2003 07:01
i think i would want it to return a list, so that you can find out all the groups they are in. maybe the 0 spot holds the active group, and the rest are ranked in order of joinging?
_____________________
i've got nothing. 
|
Phil Metalhead
Game Foundry Leaɗer
Join date: 11 Mar 2003
Posts: 291
|
04-26-2003 16:44
kewl idea nada, i like that even better  ... but if a list would be too hard or too server-intensive or whatever, i'd settle for finding their active group 
|
Phil Metalhead
Game Foundry Leaɗer
Join date: 11 Mar 2003
Posts: 291
|
04-29-2003 15:22
*bump*
does no one else find this interesting and/or useful?
|
Ope Rand
Alien
Join date: 14 Mar 2003
Posts: 352
|
04-29-2003 15:24
yeah i like it 
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
04-29-2003 21:25
I like it, It definately would help in giving more prerequisite to being in a group, and to have scripted services avalible to group members only (and not have the scripts in the open for them to copy).
|
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
|
04-29-2003 22:25
I would like it.  But what do you want it for? I dunno if its a good idea to be able to make guns that auto kill members of a certain group on sight. Then again it might be. <shrug>
|
Mark Busch
DarkLife Developer
Join date: 8 Apr 2003
Posts: 442
|
04-30-2003 08:06
yeah I can see the scripts already...
state_entry() { llSetTimerEvent(10); }
timer() { llSensor("", NULL_KEY, AGENT, 100, TWO_PI); }
sensor(integer total_number) { integer i; for(i=0;i<total_number;i++) { key person = llDetectedKey(i); if (llGetGroup(person)=="Group I don't like") { vector pos = llDetectedPos(i); llSetStatus(STATUS_SANDBOX,FALSE); llSetPos(pos); llSetStatus(STATUS_PHYSICS,TRUE); llSetDamage(100); llApplyImpulse(<100,100,100>,FALSE); } } }
This ofcourse on a hollow sphere of 3x3x3  hehe don't know if this will work, but if you can script a little you'll get the idea 
|
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
|
04-30-2003 08:26
heh it would work, if you put a true or false into the apply impulse  either one works right, cause you said it was a hollow sphere that you were going to home in on their position. Ture nastiness. I mean all i wanted the call for was to make it easy to make 'exclusive' clubs, since i am such the elitest. 
_____________________
i've got nothing. 
|
Mark Busch
DarkLife Developer
Join date: 8 Apr 2003
Posts: 442
|
04-30-2003 08:30
Yeah such a script is really nasty and unfair... Even on non-damage area's you could use it, you would trap your enemy in a big ball that falls on the ground 
|
Jake Cellardoor
CHM builder
Join date: 27 Mar 2003
Posts: 528
|
04-30-2003 12:02
Tangential question about the code snippet: TWO_PI is specified as the arc argument in the call to llSensor. If the arc is measured from the forward axis, shouldn't PI be the maximum?
|
Tcoz Bach
Tyrell Victim
Join date: 10 Dec 2002
Posts: 973
|
04-30-2003 12:34
Just curious...why wouldn't you use llSensorRepeat and entirely forego the timer?
_____________________
** ...you want to do WHAT with that cube? **
|
Phil Metalhead
Game Foundry Leaɗer
Join date: 11 Mar 2003
Posts: 291
|
04-30-2003 21:32
what originally inspired me to ask for this was my Automatic Defense System in jessie (which uses llEjectFromLand() to dispose of unwanted visitors). right now it only works on my land, and on my command, but i wanted a way to make a network of these systems between my fellow WarGamers and i that only we could activate, to help keep enemies off our land, while simultaneously preventing it from attacking us. now that i am working with charlie on our community in kissling, i could use these functions to create useful community tools that could only be used by community members and/or officers. speaking of which, here's another possible function: integer llAvatarGroupStatus(key avatar, string groupname)
returns an integer constant indicating whether the specified avatar is a member or officer in the specified group. GROUP_OFFICER: avatar is an officer of the group GROUP_MEMBER: avatar is a member of the group returns 0 if avatar is not in the specified group.
|
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
|
04-30-2003 22:32
I would like to see those two return values expanded into 4:
ACTIVE_OFFICER ACTIVE_MEMBER HIDDEN_OFFICER HIDDEN_MEMBER
but that may just be asking for too much. And the terminology could use some work - the first two are for if the group specified is their currently active group, the other two if it isn't.
|
Phil Metalhead
Game Foundry Leaɗer
Join date: 11 Mar 2003
Posts: 291
|
04-30-2003 23:06
i think a better phrasing might be GROUP_MEMBER_ACTIVE GROUP_MEMBER_INACTIVE GROUP_OFFICER_ACTIVE GROUP_OFFICER_INACTIVE or GROUP_ACTIVE_MEMBER GROUP_ACTIVE_OFFICER GROUP_INACTIVE_MEMBER GROUP_INACTIVE_OFFICER but i do like your idea 
|