Difference between revisions of "User:Gordon Wendt/testbed"
Jump to navigation
Jump to search
Gordon Wendt (talk | contribs) (lsl tags) |
Gordon Wendt (talk | contribs) m (→01: adding <lsl> and </lsl> tags to format properly) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== | <noinclude>{{#vardefine:gr_text|<nowiki>{{#var:gr_text}}</nowiki>}}</noinclude>{{#if: | ||
{{#vardefine:func_id|Warning}} | |||
{{#vardefine:header| | |||
{{{!}} style="background-color:#AAAAAA; margin-bottom:10px;" cellpadding="3" cellspacing="1" | |||
{{!}} valign="top" rowspan="2" style="background:#F9F9F9;" {{!}} [[Image:Emblem-important-yellow.png]] | |||
{{!}} style="color:white;background:#990000; border-width:1px;" width="100%" {{!}} '''Warning''' | |||
{{!}}- | |||
{{!}} style="background:#F9F9F9;" {{!}} ''The scripts or code snippets on this page are non functional at best and can be extremely harmful at worst, use at your own risk and only if you understand their coding and/or function'' | |||
{{#var:header}}}} | |||
}} | |||
<noinclude>{{#var:header}}</noinclude> | |||
__TOC__ | |||
== 01 == | |||
<lsl> | <lsl> | ||
float range = 32; | |||
string zombieName = "Zombie"; | |||
default { | |||
state_entry() { | |||
llSensorRepeat(zombieName,"",SCRIPTED,range,PI,15); | |||
} | |||
// Sensor for anything matching 'zombie' | |||
sensor (int number) { | |||
integer i; | |||
for(i=0; i < number; i++) { | |||
vector angle = llVecNorm(llDetectedPos(i) - llGetPos() + llDetectedVel(i)); | |||
llRezObject("largebullet",llGetPos() + (angle*3),angle*64,zero_rotation,0); | |||
} | |||
} | |||
} | |||
</lsl> | |||
== 10 == | |||
<lsl> | |||
// key entries prefixed with "k" denote keys of target avatars | // key entries prefixed with "k" denote keys of target avatars | ||
// string entries prefixed with "i" denote status of the avatar in numerical format | // string entries prefixed with "i" denote status of the avatar in numerical format | ||
Line 41: | Line 83: | ||
string e4; | string e4; | ||
string e5; | string e5; | ||
integer time = 10; // update time | |||
default | default | ||
Line 66: | Line 110: | ||
llSetText("",<1,0,0>,1.0); | llSetText("",<1,0,0>,1.0); | ||
llSetTimerEvent(time); | |||
} | |||
timer() | |||
{ | |||
q1 = llRequestAgentData(k1,DATA_ONLINE); | q1 = llRequestAgentData(k1,DATA_ONLINE); | ||
q2 = llRequestAgentData(k2,DATA_ONLINE); | q2 = llRequestAgentData(k2,DATA_ONLINE); | ||
Line 81: | Line 130: | ||
if (i1 == "0") | if (i1 == "0") | ||
{ | { | ||
llOwnerSay("offline"); | |||
s1 = "Offline"; | s1 = "Offline"; | ||
} | } | ||
Line 90: | Line 140: | ||
} | } | ||
if ( q2 == queryid) | |||
{ | { | ||
i2 = data; | i2 = data; | ||
Line 105: | Line 155: | ||
} | } | ||
if ( q3 == queryid) | |||
{ | { | ||
i3 = data; | i3 = data; | ||
if (i3 = "0") | if (i3 == "0") | ||
{ | { | ||
s3 == "Offline"; | s3 == "Offline"; | ||
Line 120: | Line 170: | ||
} | } | ||
if ( q4 == queryid) | |||
{ | { | ||
i4 = data; | i4 = data; | ||
Line 135: | Line 185: | ||
} | } | ||
if ( q5 == queryid) | |||
{ | { | ||
i5 = data; | i5 = data; | ||
Line 176: | Line 226: | ||
} | } | ||
</lsl> | </lsl> | ||
== 11 == | |||
== 100 == | |||
== 101 == | |||
== 110 == | |||
== 111 == | |||
== 1000 == | |||
== 1001 == | |||
== 1010 == |
Latest revision as of 21:32, 16 June 2009