Jump to content
Sign in to follow this  
Bill Woodland

combining a TP and group access only script ?

Recommended Posts

I need to make a group access only teleport door. I have the tp script working, i have a group access ript but need the 2 combined. I am far from a genious and know that after 3 hrs of trying this on my own when i am beat so I ask for help........so..........................HELP lol thanks in advance

Share this post


Link to post
Share on other sites

As far as I know there is no if member of group statement, however you are looking at an if statement here I imagine,

First take a look at:

http://lslwiki.net/lslwiki/wakka.php?wakka=llDetectedGroup

That detects the active group, what you want is an if statement on touch so that if someone is wearing the group tag it will teleport them.

--||-

Share this post


Link to post
Share on other sites

You could use either llDetectedGroup, as Ciaran suggested, or llSameGroup.  Both functions will do the same thing for you and they are very easy to drop into your TP script.  Take a look, for example, at the basic example at http://wiki.secondlife.com/wiki/LlDetectedGroup .  You should be able to add the group restriction to your TP script with just a couple of new lines of code.

Share this post


Link to post
Share on other sites

How are you tp-ing them?  If you're using warppos, then testing for llSameGroup() is straightforward enough -- go ahead and warppos off to the destination if they're in the right group, and don't if they're not.   If, however, you're trying to use llSitTarget(), it gets tricky, because you don't know what their active group is until they've sat down, and then it's too late (I think there are ways round that,  though the ones that spring to mind are pretty unpleasant, and it would be far better to use warppos if at all possible).

Share this post


Link to post
Share on other sites

One way to do it, Innula, is to define a local sit target and put the llSameGroup test in the changed event in state default.  The person who sits doesn't go anywhere, but is immediately unseated again.  If the test is successful, however, you pass control to a new state.  In state_entry of the new state, you define a distant sit target instead of the local one. Now, when the avatar sits for the second time, he's sitting on the activated TP target . That makes teleporting slightly more complicated, because it means that a person has to click twice (once to check group and once to TP), but it should work.  You do need to double check in the second state to be sure that it's the same person who sat in state default, but that's easy to do.

Share this post


Link to post
Share on other sites

Thanks.  That's a much better way of doing it than any of my ideas.

I guess most discussion of teleporters has to take place, now, in the light of the fact we should have llSetRegionPos in a few weeks and that some form of llTeleportAgent should be available before too long.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...