corrade-lsl-templates

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 35  →  ?path2? @ 36
/source/heads-up-display/grid-follow/grid-follow.lsl
@@ -391,43 +391,7 @@
 
state stop_pilot {
state_entry() {
// DEBUG
llOwnerSay("Stopping autopilot for flight...");
llRegionSayTo(
(key)wasKeyValueGet(
"corrade",
configuration
),
0,
wasKeyValueEncode(
[
"command", "autopilot",
"group", wasURLEscape(
wasKeyValueGet(
"group",
configuration
)
),
"password", wasURLEscape(
wasKeyValueGet(
"password",
configuration
)
),
// move in a radius around the current primitive.
"position", llGetPos() + wasCirclePoint(
(integer)wasURLEscape(
wasKeyValueGet(
"range",
configuration
)
)
),
"action", "stop",
"callback", wasURLEscape(callback)
]
)
);
state fly;
llSetTimerEvent(60);
}
timer() {
@@ -437,16 +401,6 @@
llSetColor(<.5,0,0>, ALL_SIDES);
llResetScript();
}
http_request(key id, string method, string body) {
llHTTPResponse(id, 200, "OK");
if(wasKeyValueGet("command", body) != "autopilot" ||
wasKeyValueGet("success", body) != "True") {
// DEBUG
llOwnerSay("Failed to stop autopilot...");
state on;
}
state fly;
}
attach(key id) {
llResetScript();
}
@@ -636,7 +590,7 @@
0,
wasKeyValueEncode(
[
"command", "autopilot",
"command", "walkto",
"group", wasURLEscape(
wasKeyValueGet(
"group",
@@ -658,7 +612,15 @@
)
)
),
"action", "start",
"vicinity", wasCirclePoint(
(integer)wasURLEscape(
wasKeyValueGet(
"range",
configuration
)
)
),
"duration", "2500",
"callback", wasURLEscape(callback)
]
)
@@ -674,10 +636,10 @@
}
http_request(key id, string method, string body) {
llHTTPResponse(id, 200, "OK");
if(wasKeyValueGet("command", body) != "autopilot" ||
if(wasKeyValueGet("command", body) != "walkto" ||
wasKeyValueGet("success", body) != "True") {
// DEBUG
llOwnerSay("Failed to start autopilot...");
llOwnerSay("Failed to start walkto...");
state on;
}
state select;
/source/heads-up-display/patrol/patrol.lsl
@@ -352,7 +352,7 @@
),
wasKeyValueEncode(
[
"command", "autopilot",
"command", "walkto",
"group", wasURLEscape(
wasKeyValueGet(
"group",
@@ -365,8 +365,27 @@
configuration
)
),
"action", "stop",
"callback", wasURLEscape(callback)
"position", wasURLEscape(
(string)(
position + wasCirclePoint(
(float)wasURLEscape(
wasKeyValueGet(
"radius",
configuration
)
)
)
)
),
"vicinity", wasCirclePoint(
(integer)wasURLEscape(
wasKeyValueGet(
"range",
configuration
)
)
),
"duration", "2500"
]
)
);
@@ -373,7 +392,7 @@
}
http_request(key id, string method, string body) {
llHTTPResponse(id, 200, "OK");
if(wasKeyValueGet("command", body) != "autopilot" ||
if(wasKeyValueGet("command", body) != "walkto" ||
wasKeyValueGet("success", body) != "True") {
// DEBUG
llOwnerSay("Could not get Corrade to stop, restarting script...");
@@ -388,7 +407,7 @@
),
wasKeyValueEncode(
[
"command", "autopilot",
"command", "walkto",
"group", wasURLEscape(
wasKeyValueGet(
"group",
@@ -413,7 +432,15 @@
)
)
),
"action", "start"
"vicinity", wasCirclePoint(
(integer)wasURLEscape(
wasKeyValueGet(
"range",
configuration
)
)
),
"duration", "2500"
]
)
);