Jump to content

combining a TP and group access only script ?


Bill Woodland
 Share

You are about to reply to a thread that has been inactive for 4494 days.

Please take a moment to consider if this thread is worth bumping.

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

Link to comment
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.

Link to comment
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).

Link to comment
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.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4494 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...