|
Dick Spad
Life is a Pose Ball ....
Join date: 29 Oct 2007
Posts: 205
|
09-13-2008 11:04
Hello all you great people of this forum. Even though I'm not a scripter I find it interesting reading this forum to pick up tips and to try to figure this strange language put. But I need some help in adding a permissions statement to a script that I'm using, or your advice in the best way to achieve this. I have a simple TP script i use in my store to TP me and my partner up you my workshop, I was wondering i was wondering if there is a way to add a statement to the following script, which would only allow people I wish can use this Tp i set up? TIA
============================================== This is the script I use ==============================================
vector targetPos = <75, 90, 312>; //The target location
reset() { vector target; target = (targetPos- llGetPos()) * (ZERO_ROTATION / llGetRot()); llSitTarget(target, ZERO_ROTATION); llSetSitText(llGetObjectName()); } default { state_entry() { reset(); } on_rez(integer startup_param) { reset(); } changed(integer change) { llUnSit(llAvatarOnSitTarget()); reset(); } }
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
09-13-2008 22:58
sit target teleporters can't be filtered by permissions in the way you want...
at least not simply....
what you could do is have it check the key of the person that sat on it, then move position, unseat, and move back, if the key matches your allowed persons, otherwise just unsit them.
it's a different style, but it'll at least preserve the single click to sit funtionality
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Dick Spad
Life is a Pose Ball ....
Join date: 29 Oct 2007
Posts: 205
|
09-14-2008 08:24
From: Void Singer sit target teleporters can't be filtered by permissions in the way you want... at least not simply.... what you could do is have it check the key of the person that sat on it, then move position, unseat, and move back, if the key matches your allowed persons, otherwise just unsit them. it's a different style, but it'll at least preserve the single click to sit funtionality Thanks for the reply Void .... looks like i have some work do to ..lol
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
09-14-2008 10:55
It also depends on how far you need to teleport. I'm in a generous mood this afternoon. Enjoy and use it but keep learning too. list avList = ["Dick Spad"]; key avKey; vector targetVec; vector destVec = <217,92,4000>; //Set target vector here vector homeVec;
//Tinkered warpPos. See original at:http://wiki.secondlife.com/wiki/WarpPos warpPos(vector targetVec){ integer jumps = (integer) (llVecDist(targetVec, llGetPos()) / 10.0) + 1; if (jumps > 411) jumps = 411; list rules =[PRIM_POSITION, targetVec]; integer count = 1; while ((count = count << 1) < jumps) rules += rules; llSetPrimitiveParams(rules + llList2List(rules, (count - jumps) << 1, count)); }
default { state_entry() {
llSetClickAction(CLICK_ACTION_SIT); llSitTarget(<0, 0, 0.5 >, ZERO_ROTATION); homeVec = llGetPos(); } changed(integer change) { if (change & CHANGED_LINK) { avKey = llAvatarOnSitTarget(); if (llListFindList(avList, [llKey2Name(avKey)]) != -1) { targetVec = destVec; warpPos(targetVec); llSleep(0.5); llUnSit(avKey); targetVec = homeVec; warpPos(targetVec); } else llUnSit(avKey); } } } EDIT: WOOHOO, I see we don't have to call warpPos in loops now because of extra memory with MONO.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Soen Eber
Registered User
Join date: 3 Aug 2006
Posts: 428
|
09-14-2008 11:06
The above script should work great, just add the names you want to the list. If you want another option, message #25 in /54/24/138989/1.html has my teleport script which can be set entirely from the object's description, and allows owner only/group only/public access settings.
|
|
Dick Spad
Life is a Pose Ball ....
Join date: 29 Oct 2007
Posts: 205
|
09-15-2008 07:17
Jesse & Soen ... I thank the both of you for your post and help, and Jesse dont worry I will keep on learnin 
|