legoiceking
-
Posts
6 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Posts posted by legoiceking
-
-
2 minutes ago, Nova Convair said:
A script that needs permissions needs to request that permissions.
The permissions are then granted for that script. For the requesting script and ONLY this script.
If you have a 2nd script that requires permissions this script needs to request permissions too.
For your case: your hud has teleport permissions. There is no need to do the teleportation by another object. Just let the object send the target location to the hud and the hud can do the teleportation. Otherwise you need to grant permissions for every collision object or use experiences.
You did read the wiki and know that llTeleportAgent can only teleport the owner?
If you have other plans you definitely need experiences.Correct yes, its a hud for an rp sim so everyone will have one, I dont have the premium account for experiences so i was trying to see if i could script something similar or close to that effect.
-
4 minutes ago, Rachel1206 said:
You must request permissions before calling llTeleportAgent();
run_time_permissions(integer perm)
{
if(PERMISSION_TELEPORT & perm)
{
llTeleportAgent(teleportee, "", <13.0, 38.0, 23.5>, <13.0, 12.0, 23.5>);
}
}teleportee = llDetectedKey(0);
llRequestPermissions(teleportee, PERMISSION_TELEPORT);I did that in the hud script, how do i get my listening script to read that?
-
16 minutes ago, Profaitchikenz Haiku said:
Not sure quite what you're trying to achieve at the end of state_entry() in the HUD script, as it stands it will simply generate a TRUE or FALSE condition but you don't save the result. If you had meant to put a single = instead of == it makes absolutely no sense at all, however.
llGetOwner() == teleportee;
Then, inside the Listen event, you have llListenRemoveHandle before some subsequent tests for messages, it should be moved to the end of all tests where you don't want to initiate a further dialog or further actions.
The main issue I see in the listener script you are using llDetectedKey(0) outside of an event.
From what I understand you are wanting to get the collision event in one script and obtain the key of a colliding avatar and after obtaining permission to Teleport, but then use a second script to actually teleport the colliding agent, but the permissions you asked for will be those granted to the agent wearing the HUD when it was first put on, not the person bumping into the HUD, (which I don't think could ever actually happen).
Im tryign to get it to where people who are wearing the hud and bump into certain objects get teleported. I am trying to make it easier on telelporting since bumping without grabbing permissions does not work.
-
OK, so I am trying to create hud that premtively grabs perms then sends out those perms when colliding with something.
I created step level testing for each phase, so far it works up until it needs to read the permissions. In the testing it says no perms detected even though perms were given.
Excuse my language I just find it funny when the object talks back
Hud Script:
list buttons = ["-", "Btn1", "Btn2", "Btn3"]; string dialogInfo = "\nPlease make a choice."; key teleportee; key ToucherID; integer dialogChannel; integer listenHandle; default { // reset script when the object is rezzed on_rez(integer start_param) { llResetScript(); } changed(integer change) { // reset script when the owner or the inventory changed if (change & (CHANGED_OWNER | CHANGED_INVENTORY)) llResetScript(); } state_entry() { dialogChannel = -1 - (integer)("0x" + llGetSubString( (string)llGetKey(), -7, -1) ); llRequestPermissions(llGetOwner(), PERMISSION_TELEPORT); llGetOwner() == teleportee; } touch_start(integer num_detected) { ToucherID = llDetectedKey(0); llListenRemove(listenHandle); listenHandle = llListen(dialogChannel, "", ToucherID, ""); llDialog(ToucherID, dialogInfo, buttons, dialogChannel); llSetTimerEvent(60.0); // Here we set a time limit for responses } collision_start(integer num) { llSay(1642,"Pressed"); } listen(integer channel, string name, key id, string message) { if (message == "-") { llDialog(ToucherID, dialogInfo, buttons, dialogChannel); return; } llListenRemove(listenHandle); // stop timer since the menu was clicked llSetTimerEvent(0); if (message == "Btn1") { //listen to this specific channel llListen(1641, "",NULL_KEY, ""); llSay(1640,"Pressed"); } else if (message == "Btn2") { //listen to this specific channel llListen(1641, "",NULL_KEY, ""); llSay(1643,"Pressed"); } if (message == "Btn3") { //listen to this specific channel llListen(1641, "",NULL_KEY, ""); llSay(1644,"Pressed"); } else { //do anything else } } timer() { // stop timer llSetTimerEvent(0); llListenRemove(listenHandle); llWhisper(0, "Sorry. You snooze; you lose."); } }
Listening Script
key teleportee; Teleport() { integer perm = llGetPermissions(); { if(PERMISSION_TELEPORT & perm) { llSay(0,"Perms Detected"); llTeleportAgent(llDetectedKey(0), "", <13.0, 38.0, 23.5>, <13.0, 12.0, 23.5>); } else { llSay(0,"No Perms Detected"); } } } default { state_entry() { //listen to this specific channel llListen(1641, "",NULL_KEY, ""); llListen(1640, "",NULL_KEY, ""); llListen(1643, "",NULL_KEY, ""); llListen(1644, "",NULL_KEY, ""); llListen(1642, "",NULL_KEY, ""); //you can say something like this llSay(1641,"Pressed"); } //listen for something to happen listen(integer channel, string name, key id, string message) { if(channel == 1642) { llSay(0, "The Hud Works!"); Teleport(); } else { llSay(0,"You *****ed it"); } } }
-
The marketplace on 1/2/17 has broken and i lost 3,475 L to the infinite load, it took my L after i exited out of the thing since it didnt load and never gave me my items i bought I do not have a order number but it is in my transaction history and the items are still in my cart -w-
Description Unit Price Qty Total: SSRRPS - USS Rainier - Sato Class - Star Ship Set for Trek RPers
Sold by Yurei Kubo Visit The Store Remove from cartL$750 L$750 "Pegas"
Sold by DekabristMouse Visit The Store Remove from cartL$200 L$200 [COLONY:2420] Pallas-class Battleship pack
Sold by Chainsword Audion Visit The Store Remove from cartL$500 L$500 Dauntless Space Ship
Sold by Moo Spyker Visit The Store Remove from cartL$300 L$300 IDC Server With GDO
Sold by cyber Ahn Visit The Store Gift for Lonereddemon Resident Edit gift message Remove from cartL$400 L$400 [CLNY2420] Interceptor MKII - Red
Sold by Chainsword Audion Visit The Store Remove from cartL$125 L$125 SGC Center
Sold by cyber Ahn Visit The Store Gift for Lonereddemon Resident Edit gift message Remove from cartL$1,200 L$1,200 Total: L$3,475
Permission Sharing
in LSL Scripting
Posted
So reverse it then? I think i can group lock the script.