Difference between revisions of "LlGetAgentSize"

From Second Life Wiki
Jump to navigation Jump to search
(Added Example)
Line 9: Line 9:
|constants
|constants
|examples
|examples
<pre>
//A simple script that makes a box hover above the owner's head.
default {
    on_rez(integer i) {
          llSensor("", "", AGENT, 100000, 10000);
    }
    sensor(integer num) {
          integer i = 0;
          while (i < num) {
              if (llDetectedKey(i) == llGetOwner()) {
                    vector where = llDetectedPos(i);
                    vector agent = llGetAgentSize(llGetOwner())/2;
                    size += agent.z + <0,0,.5>;
                    llSetPos(where);
              }
              i++;
          }
    }
}
</pre>
|helpers
|helpers
|also_functions=
|also_functions=

Revision as of 15:09, 12 October 2007