<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lastro+Greenwood</id>
	<title>Second Life Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lastro+Greenwood"/>
	<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/wiki/Special:Contributions/Lastro_Greenwood"/>
	<updated>2026-07-26T14:16:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetParcelPrimCount&amp;diff=1114482</id>
		<title>LlGetParcelPrimCount</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetParcelPrimCount&amp;diff=1114482"/>
		<updated>2010-11-26T07:43:59Z</updated>

		<summary type="html">&lt;p&gt;Lastro Greenwood: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Constants/Parcel Prim Count}}{{#vardefine:FALSE|{{LSL Const|FALSE|integer|0|c=Treated as false by conditionals.}}}}&lt;br /&gt;
{{LSL_Function&lt;br /&gt;
|func_id=325|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGetParcelPrimCount|return_type=integer&lt;br /&gt;
|p1_type=vector|p1_name=pos|p1_desc=[[Viewer coordinate frames#Region|region coordinate]] (z component is ignored)&lt;br /&gt;
|p2_type=integer|p2_name=category|p2_desc=a PARCEL_COUNT_* flag&lt;br /&gt;
|p3_type=integer|p3_name=sim_wide|p3_desc=boolean&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the number of prims on the parcel at &#039;&#039;&#039;pos&#039;&#039;&#039; of the given &#039;&#039;&#039;category&#039;&#039;&#039;&lt;br /&gt;
|spec=If &#039;&#039;&#039;sim_wide&#039;&#039;&#039; is...&lt;br /&gt;
*TRUE then the return is the combined number of prims on all parcels in the sim owned by the specified parcel&#039;s owner of the category requested.&lt;br /&gt;
*{{#var:FALSE}} then the return is the number of prims of the category requested on the parcel specified.&lt;br /&gt;
|caveats&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;//gives prim usage information when touched.&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        vector pos = llGetPos();&lt;br /&gt;
        llSay(0, &amp;quot;There are &amp;quot; + (string)llGetParcelPrimCount(pos, PARCEL_COUNT_TOTAL, FALSE) +&lt;br /&gt;
                 &amp;quot; total prims on this parcel&amp;quot;);&lt;br /&gt;
        llSay(0, (string)llGetParcelPrimCount(pos, PARCEL_COUNT_OWNER, FALSE) +&lt;br /&gt;
                 &amp;quot; prims are owned by the parcel owner&amp;quot;);&lt;br /&gt;
        llSay(0, (string)llGetParcelPrimCount(pos, PARCEL_COUNT_GROUP, FALSE) +&lt;br /&gt;
                 &amp;quot; prims set to or owned by the parcel&#039;s group.&amp;quot;);&lt;br /&gt;
        llSay(0, (string)llGetParcelPrimCount(pos, PARCEL_COUNT_OTHER, FALSE) +&lt;br /&gt;
                 &amp;quot; prims that are not set to the parcel group or owned by the parcel owner&amp;quot;);&lt;br /&gt;
        llSay(0, (string)llGetParcelPrimCount(pos, PARCEL_COUNT_SELECTED, FALSE) +&lt;br /&gt;
                 &amp;quot; prims are selected&amp;quot;);&lt;br /&gt;
        llSay(0, (string)llGetParcelPrimCount(pos, PARCEL_COUNT_TEMP, FALSE) +&lt;br /&gt;
                 &amp;quot; prims are temp-on-rez&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetParcelMaxPrims]]}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|negative_index&lt;br /&gt;
|sort=GetParcelPrimCount&lt;br /&gt;
|cat1=Parcel&lt;br /&gt;
|cat2=Parcel/Prim Count&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Lastro Greenwood</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetParcelPrimCount&amp;diff=1114472</id>
		<title>LlGetParcelPrimCount</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetParcelPrimCount&amp;diff=1114472"/>
		<updated>2010-11-26T07:41:32Z</updated>

		<summary type="html">&lt;p&gt;Lastro Greenwood: Fixed some engrish&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Constants/Parcel Prim Count}}{{#vardefine:FALSE|{{LSL Const|FALSE|integer|0|c=Treated as false by conditionals.}}}}&lt;br /&gt;
{{LSL_Function&lt;br /&gt;
|func_id=325|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGetParcelPrimCount|return_type=integer&lt;br /&gt;
|p1_type=vector|p1_name=pos|p1_desc=[[Viewer coordinate frames#Region|region coordinate]] (z component is ignored)&lt;br /&gt;
|p2_type=integer|p2_name=category|p2_desc=a PARCEL_COUNT_* flag&lt;br /&gt;
|p3_type=integer|p3_name=sim_wide|p3_desc=boolean&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the number of prims on the parcel at &#039;&#039;&#039;pos&#039;&#039;&#039; of the given &#039;&#039;&#039;category&#039;&#039;&#039;&lt;br /&gt;
|spec=If &#039;&#039;&#039;sim_wide&#039;&#039;&#039; is...&lt;br /&gt;
*{{#var:TRUE}} then the return is the combined number of prims on all parcels in the sim owned by the specified parcel&#039;s owner of the category requested.&lt;br /&gt;
*{{#var:FALSE}} then the return is the number of prims of the category requested on the parcel specified.&lt;br /&gt;
|caveats&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;//gives prim usage information when touched.&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        vector pos = llGetPos();&lt;br /&gt;
        llSay(0, &amp;quot;There are &amp;quot; + (string)llGetParcelPrimCount(pos, PARCEL_COUNT_TOTAL, FALSE) +&lt;br /&gt;
                 &amp;quot; total prims on this parcel&amp;quot;);&lt;br /&gt;
        llSay(0, (string)llGetParcelPrimCount(pos, PARCEL_COUNT_OWNER, FALSE) +&lt;br /&gt;
                 &amp;quot; prims are owned by the parcel owner&amp;quot;);&lt;br /&gt;
        llSay(0, (string)llGetParcelPrimCount(pos, PARCEL_COUNT_GROUP, FALSE) +&lt;br /&gt;
                 &amp;quot; prims set to or owned by the parcel&#039;s group.&amp;quot;);&lt;br /&gt;
        llSay(0, (string)llGetParcelPrimCount(pos, PARCEL_COUNT_OTHER, FALSE) +&lt;br /&gt;
                 &amp;quot; prims that are not set to the parcel group or owned by the parcel owner&amp;quot;);&lt;br /&gt;
        llSay(0, (string)llGetParcelPrimCount(pos, PARCEL_COUNT_SELECTED, FALSE) +&lt;br /&gt;
                 &amp;quot; prims are selected&amp;quot;);&lt;br /&gt;
        llSay(0, (string)llGetParcelPrimCount(pos, PARCEL_COUNT_TEMP, FALSE) +&lt;br /&gt;
                 &amp;quot; prims are temp-on-rez&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetParcelMaxPrims]]}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|negative_index&lt;br /&gt;
|sort=GetParcelPrimCount&lt;br /&gt;
|cat1=Parcel&lt;br /&gt;
|cat2=Parcel/Prim Count&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Lastro Greenwood</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Nyx_Linden/Office_Hours_Agenda&amp;diff=1113902</id>
		<title>User:Nyx Linden/Office Hours Agenda</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Nyx_Linden/Office_Hours_Agenda&amp;diff=1113902"/>
		<updated>2010-11-24T19:32:53Z</updated>

		<summary type="html">&lt;p&gt;Lastro Greenwood: /* November 24, 2010 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Nyx Linden&#039;s Office Hours Agenda==&lt;br /&gt;
&lt;br /&gt;
Office hours are on Wednesdays at Noon in Pacific time (SL standard time) located in Borrowdale at: http://slurl.com/secondlife/Borrowdale/74/217/32&lt;br /&gt;
&lt;br /&gt;
Topics are focused on avatars, content creation efficiency, content creation tools and methods, rendering issues, and many related random topics.&lt;br /&gt;
&lt;br /&gt;
Please add topics for discussion / agenda items to the end of the list below prior to 11:50 AM. Priority will be given to topics that are posted in advance and are relevant to the goals of the office hour. Feel free to include relevant links to JIRA or wiki pages. Contact Nyx Linden if you are unsure if your topic is relevant or appropriate.&lt;br /&gt;
&lt;br /&gt;
Archived agendas can be found at the [[User:Nyx_Linden/Office_Hours_Agenda_Archive|agenda archive]].&lt;br /&gt;
&lt;br /&gt;
Next meeting scheduled for: November 24, 2010.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Agenda===&lt;br /&gt;
&lt;br /&gt;
== November 24, 2010 ==&lt;br /&gt;
# Normal mapping ({{jira|VWR-3250}})&lt;br /&gt;
# Nyx, can you comment on why the + is not in Inventory/Recent? ({{jira|VWR-23903}})&lt;br /&gt;
# What should we do if we see an inconsistency between the wiki and the (un)real world? Example is Note 2 of the Physics cost wiki page: truth: Meshes without physics shape CAN be set to type prim.&lt;br /&gt;
# Are physics costs recalculated at start/during/after movement? &lt;br /&gt;
# What is now the effect of scripted changes (eg scale) that cause prim limit to be exceeded?&lt;br /&gt;
# Nyx, did Esbee ever get to talk to you about the AgentHeight bug?&lt;br /&gt;
# Uhm kind of a thing i&#039;ve forgotten about... The mesh representation for round objects doesn&#039;t seem to have a good number of segments. Good would be, say, 12, and multiples thereof, because that is divisible by both 3 and 4, making many kinds of builds join up neatly. At anything but insanely high LOD a discontinuity between, as an example, a quarter of a cylinder and a cube is apparent, perhaps because number of cylinder segments isn&#039;t multiple of 4.&lt;br /&gt;
# When a large number of primitives are removed, the resulting lag; What is the best way to mitigate the effect and what causes it? (When I say large I mean between 1024 and 2048 prims)&lt;br /&gt;
# &#039;&#039;&#039;Your topic here&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Lastro Greenwood</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlGetDisplayName&amp;diff=1113022</id>
		<title>Talk:LlGetDisplayName</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlGetDisplayName&amp;diff=1113022"/>
		<updated>2010-11-22T23:26:58Z</updated>

		<summary type="html">&lt;p&gt;Lastro Greenwood: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Would it be worth making a specific reference to https://jira.secondlife.com/browse/VWR-23627 &amp;quot;Display Name and Username showing as ???&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
[[User:Innula Zenovka|Innula Zenovka]] 18:40, 8 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Yes it is worth referencing it. I&#039;ll add it right now. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 05:38, 9 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Added a warning about escaping strings, this is because even though it is one change per week. People can cause alot of damage.&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
Unescaped shell script running on a residents server (linux) (they are stupid if they do this but still), &#039;;rm -rf /&lt;br /&gt;
&lt;br /&gt;
MySQL Example (its bad practise not to sanitize your strings but its a regular occurrence): &#039; or &#039;&#039; = &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If it needs better formatting, please correct and let me know in world so I can remember for next time.&lt;br /&gt;
&lt;br /&gt;
[[User:Lastro Greenwood|Lastro Greenwood]] 23:26, 22 November 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Lastro Greenwood</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetDisplayName&amp;diff=1113012</id>
		<title>LlGetDisplayName</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetDisplayName&amp;diff=1113012"/>
		<updated>2010-11-22T23:23:31Z</updated>

		<summary type="html">&lt;p&gt;Lastro Greenwood: Added warning about escaping strings to prevent a wave of injection attacks on people&amp;#039;s backends when these functions go live.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|inject-1=&lt;br /&gt;
{{LSL Function/avatar|id|sim=*}}&lt;br /&gt;
{{LSL Generic/pre-release|server-release=[[Display Names|DisplayNames]]}}&lt;br /&gt;
{{LSL_Function/warning|Security|It is a &#039;&#039;&#039;terrible&#039;&#039;&#039; idea to tie any security measures to display names. Don&#039;t do it.}}&lt;br /&gt;
{{LSL_Function/warning|Security|They can contain quotes and some punctuation, remember to &#039;&#039;&#039;escape&#039;&#039;&#039; strings being passed to command line scripts, sql queries, etc.}}&lt;br /&gt;
{{Issues/DN-202}}&lt;br /&gt;
|func_id=NNN|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|sort=GetDisplayName|func=llGetDisplayName&lt;br /&gt;
|return_type=string|p1_type=key|p1_name=id&lt;br /&gt;
|func_footnote=&#039;&#039;&#039;id&#039;&#039;&#039; must specify a valid avatar key, present in or otherwise known to the sim in which the script is running, otherwise an empty string is returned. This function will still return a valid display name if the avatar is a child agent of the sim (i.e., in an adjacent sim, but presently able to see into the one the script is in), or for a short period after the avatar leaves the sim (specifically, when the client completely disconnects from the sim, either as a main or child agent).&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the non-unique [[Display names|display name]] of the avatar specified by &#039;&#039;&#039;id&#039;&#039;&#039;.&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=* To get around the &amp;quot;avatar must be present&amp;quot; limitation, you can use the [[llRequestDisplayName]] function and the [[dataserver]] event to obtain the avatar&#039;s display name from a key.&lt;br /&gt;
* There is no opposite function ([[llDisplayName2Key]]) available since display names are non-unique&lt;br /&gt;
* Either of &amp;quot;???&amp;quot; or &amp;quot;&amp;quot; is returned if the region is unable to return display names. This can happen even if display names are enabled on the region, especially the first time a given key is checked. At least one retry may be advisable. Do not rely on this function to verify avatar presence.&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;// Best viewed in Chat History (ctrl-h)&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    collision_start(integer a)//Announce who collided&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;llGetDisplayName: &amp;quot; + llGetDisplayName(llDetectedKey(0)) +&lt;br /&gt;
               &amp;quot;\nllDetectedName: &amp;quot; + llDetectedName(0));&lt;br /&gt;
    }&lt;br /&gt;
    touch_start(integer a)&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0,&amp;quot;llGetDisplayName: &amp;quot; + llGetDisplayName(llDetectedKey(0)) +&lt;br /&gt;
               &amp;quot;\nllDetectedName: &amp;quot; + llDetectedName(0));&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetUsername]]}}&lt;br /&gt;
{{LSL DefineRow||[[llRequestDisplayName]]|Uses the [[dataserver]] to request avatar information}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles=&lt;br /&gt;
|also_tests&lt;br /&gt;
|notes=&lt;br /&gt;
|cat1=Avatar&lt;br /&gt;
|cat2=Display Name&lt;br /&gt;
|cat3=Key&lt;br /&gt;
|cat4=Avatar/Name&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Lastro Greenwood</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlRequestDisplayName&amp;diff=1113002</id>
		<title>LlRequestDisplayName</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlRequestDisplayName&amp;diff=1113002"/>
		<updated>2010-11-22T23:21:36Z</updated>

		<summary type="html">&lt;p&gt;Lastro Greenwood: Added warning about escaping strings to prevent a wave of injection attacks on people&amp;#039;s backends when these functions go live.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#vardefine:p_data_desc|DATA_* flag}}{{LSL_Function&lt;br /&gt;
|inject-1={{LSL Function/avatar|id}}{{LSL Generic/pre-release|server-release=[[Display Names|DisplayNames]]}}&lt;br /&gt;
{{LSL_Function/warning|Security|It is a &#039;&#039;&#039;terrible&#039;&#039;&#039; idea to tie any security measures to display names. Don&#039;t do it.}}&lt;br /&gt;
{{LSL_Function/warning|Security|They can contain quotes and some punctuation, remember to &#039;&#039;&#039;escape&#039;&#039;&#039; strings being passed to command line scripts, sql queries, etc.}}&lt;br /&gt;
|func_id=NNN|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llRequestDisplayName&lt;br /&gt;
|return_type=key&lt;br /&gt;
|p1_type=key|p1_name=id&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc=Requests the &#039;&#039;&#039;[[Display_Names|Display Name]]&#039;&#039;&#039; of the agent identified by &#039;&#039;&#039;id&#039;&#039;&#039;. When the Display Name is available the [[dataserver]] event will be raised. The agent identified by &#039;&#039;&#039;id&#039;&#039;&#039; does not need to be in the same region or online at the time of the request.&lt;br /&gt;
|Return_text=that is used to identify the [[dataserver]] event when it is raised.&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*If the request fails for any reason, there will be no error notice or dataserver event. You may use a timer to check for stale requests.&lt;br /&gt;
*If you merely wish to show avatar name information in the viewer window, it may be more straightforward to avoid a dataserver event and simply output: &amp;lt;lsl&amp;gt;llSay(0, &amp;quot;secondlife:///app/agent/&amp;quot; + (string)id + &amp;quot;/about&amp;quot;);&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;key owner_key;&lt;br /&gt;
key owner_name_query;&lt;br /&gt;
string owner_display_name;&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        owner_key = llGetOwner();&lt;br /&gt;
        owner_name_query = llRequestDisplayName(owner_key);&lt;br /&gt;
    }&lt;br /&gt;
    dataserver(key queryid, string data)&lt;br /&gt;
    {&lt;br /&gt;
        if ( owner_name_query == queryid )&lt;br /&gt;
        {&lt;br /&gt;
            owner_display_name = data;&lt;br /&gt;
            llSay(0, &amp;quot;The display name of the owner of this script : &amp;quot; + owner_display_name );&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetDisplayName]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llRequestUsername]]|}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events={{LSL DefineRow||[[dataserver]]|}}&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|deprecated&lt;br /&gt;
|cat1=Dataserver&lt;br /&gt;
|cat2=Avatar&lt;br /&gt;
|cat3=Avatar/Name&lt;br /&gt;
|cat4=Display Name&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Lastro Greenwood</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Lastro_Greenwood&amp;diff=995732</id>
		<title>User:Lastro Greenwood</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Lastro_Greenwood&amp;diff=995732"/>
		<updated>2010-08-07T08:18:53Z</updated>

		<summary type="html">&lt;p&gt;Lastro Greenwood: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Lastro Greenwood&#039;s Page ==&lt;br /&gt;
Hey everyone, I&#039;m Lastro Greenwood.&lt;br /&gt;
&lt;br /&gt;
I specialise in software development but can kinda build.&lt;br /&gt;
&lt;br /&gt;
== Scratch Pad ==&lt;br /&gt;
=== llCastRay ===&lt;br /&gt;
Determines if something is blocking line of sight to avatar.&lt;br /&gt;
&lt;br /&gt;
Uses:&lt;br /&gt;
* Radiation?&lt;br /&gt;
* Checking to see if avatar is hiding behind cover&lt;br /&gt;
* Checking to see if avatar has line of sight to a heat source&lt;br /&gt;
* Other stuff that requires LOS&lt;br /&gt;
&lt;br /&gt;
Observations:&lt;br /&gt;
* When running the trace it seems to go straight through all objects that get in its way&lt;br /&gt;
* It will return false if you dont filter out the object, a quick fix would be to change &amp;quot;if(numobj == 0)&amp;quot; to &amp;quot;if(numobj == 1)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer getnumobj(list traceres)&lt;br /&gt;
{&lt;br /&gt;
    return (integer)llList2String(traceres,llGetListLength(traceres)-1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
integer isVisible(vector start, vector finish, integer filter)&lt;br /&gt;
{&lt;br /&gt;
    list res = llCastRay(start,finish,filter,0);&lt;br /&gt;
    integer numobj = getnumobj(res);&lt;br /&gt;
    &lt;br /&gt;
    if(numobj == 0)&lt;br /&gt;
        return TRUE;&lt;br /&gt;
    &lt;br /&gt;
    return FALSE;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        vector pos = llGetPos();&lt;br /&gt;
        vector finalpos = llDetectedPos(0);&lt;br /&gt;
        if(isVisible(pos,finalpos,AGENT) == TRUE)&lt;br /&gt;
            llOwnerSay(&amp;quot;I can see clearly now!&amp;quot;);&lt;br /&gt;
        else&lt;br /&gt;
            llOwnerSay(&amp;quot;Something is in my way!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RLV ==&lt;br /&gt;
&lt;br /&gt;
=== RLV ASN Stargate Script ===&lt;br /&gt;
Allows for auto-teleporting via RLV, supports most relays&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;vector regCorner;&lt;br /&gt;
integer relayChannel = -1812221819;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    link_message(integer sender, integer num, string msg, key id)&lt;br /&gt;
    {&lt;br /&gt;
        if(num != 205902)&lt;br /&gt;
            return;&lt;br /&gt;
        &lt;br /&gt;
        list data = llParseString2List(id,[&amp;quot;|&amp;quot;],[]);&lt;br /&gt;
        string cmd = llList2String(data,0);&lt;br /&gt;
        &lt;br /&gt;
        if(cmd == &amp;quot;dial succeeded&amp;quot;)&lt;br /&gt;
        {&lt;br /&gt;
            string region = llList2String(data,1);&lt;br /&gt;
            regCorner = (vector)llList2String(data,2);&lt;br /&gt;
            llRequestSimulatorData(region,DATA_SIM_POS);&lt;br /&gt;
        }&lt;br /&gt;
        if(cmd == &amp;quot;wormhole collision&amp;quot;)&lt;br /&gt;
        {&lt;br /&gt;
            string target = llList2String(data,2);&lt;br /&gt;
            string msg = &amp;quot;stargate,&amp;quot; + (string)target + &amp;quot;,@tpto:&amp;quot; +&lt;br /&gt;
            (string)regCorner.x + &amp;quot;/&amp;quot; +&lt;br /&gt;
            (string)regCorner.y + &amp;quot;/&amp;quot; + &lt;br /&gt;
            (string)regCorner.z + &amp;quot;=force&amp;quot;;&lt;br /&gt;
            &lt;br /&gt;
            llWhisper(relayChannel,msg);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        /*string msgOut = &amp;quot;LINK MSG\n&amp;quot;;&lt;br /&gt;
        msgOut += &amp;quot;sender: &amp;quot; + (string)sender + &amp;quot;\n&amp;quot;;&lt;br /&gt;
        msgOut += &amp;quot;num: &amp;quot; + (string)num + &amp;quot;\n&amp;quot;;&lt;br /&gt;
        msgOut += &amp;quot;msg: &amp;quot; + msg + &amp;quot;\n&amp;quot;;&lt;br /&gt;
        msgOut += &amp;quot;key: &amp;quot; + (string)id + &amp;quot;\n&amp;quot;;&lt;br /&gt;
        llOwnerSay(msgOut);*/&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    dataserver(key req, string data)&lt;br /&gt;
    {&lt;br /&gt;
        regCorner += (vector)data;&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lastro Greenwood</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlCastRay&amp;diff=995682</id>
		<title>Talk:LlCastRay</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlCastRay&amp;diff=995682"/>
		<updated>2010-08-07T00:54:45Z</updated>

		<summary type="html">&lt;p&gt;Lastro Greenwood: /* Possibility of a &amp;quot;Fast&amp;quot; trace */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Why isn&#039;t this using the sensor API? ==&lt;br /&gt;
&lt;br /&gt;
# The sensor API already exists and has well understood behavior.&lt;br /&gt;
# The sensor API resolves many of the problems people have brought up, such as list length and range.&lt;br /&gt;
# The sensor API is asynchronous.&lt;br /&gt;
# Creating new APIs when there are already viable existing ones leads to Mainframe-itis.&lt;br /&gt;
# This would be an opportunity to add a result filter variant to the llSensor() family...&lt;br /&gt;
&lt;br /&gt;
llCastRay(string name, key id, integer type, float range, vector path, integer request_mask);&lt;br /&gt;
&lt;br /&gt;
Eg:&lt;br /&gt;
&lt;br /&gt;
 llCastRay(&amp;quot;&amp;quot;, &amp;quot;&amp;quot;, AGENT|ACTIVE|PASSIVE, 32, &amp;lt;1, 0, 0&amp;gt;, SENSOR_POSITION);&lt;br /&gt;
  &lt;br /&gt;
 /...&lt;br /&gt;
 &lt;br /&gt;
 sensor(integer n)&lt;br /&gt;
 {&lt;br /&gt;
   integer i;&lt;br /&gt;
   for(i = 0; i &amp;lt; n; i++)&lt;br /&gt;
     llSay(0, &amp;quot;Ping at &amp;quot;+(string)llDetectedPos(i));&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
-- [[User:Argent Stonecutter|Argent Stonecutter]] 11:53, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I think somewhere Falcon said not doing it like sensors was intentional in order to get the data the moment the command is run instead of having to wait for an event, i don&#039;t remember seeing an explanation why this was a better approach though.&lt;br /&gt;
:Btw, how would the normal of the hit(s) be reported? A new llDetected* function? Perhaps this would be an opportunity to introduce list llDetected(integer index, list what), this way future llDetected* functions can be easily prototyped without needing to actually implement a whole new command in the server (you know, like with the primitive params stuff)&lt;br /&gt;
:ps: talking about normals and llDetected* i would like to plug [http://jira.secondlife.com/browse/SVC-3369 SVC-3369] &amp;quot;llDetectedCollisions* (similar to llDetectedTouch*)&amp;quot; , mind taking a look Falcon?&lt;br /&gt;
--[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 12:46, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:This was not done like the sensor API because it&#039;s not really all that similar to sensors. Unfortunately I don&#039;t have time to get into a discussion of why the API you&#039;re suggesting would be problematic, but if you read the history of this feature (SVC-5389), I hope you&#039;ll begin to see where I&#039;m coming from.&lt;br /&gt;
:Tigro, Sorry, I&#039;m backlogged for a month at this point, so I don&#039;t think I&#039;ll be able to look at that soon. :) In general, I&#039;m looking at this feature right now only because it affects a huge audience and is way, way overdue. Oh, and because I&#039;m a physics guy and it&#039;s a physics feature more than anything else. :P&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 03:34, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::SVC-5389 is about download problems. Do you mean SVC-5381? There&#039;s a couple of notes about sensors being &amp;quot;heavy&amp;quot;, but not really any explanation of why they&#039;re &amp;quot;heavy&amp;quot;. The only heavy feature of sensors is that it calculates and returns more information than you&#039;re asking for, and the request_mask would take care of that... and would open up the possibility of adding the same kind of masking to existing sensor calls. In terms of scripting, sensors are in many ways lighter because you&#039;re not having to pass around (and copy) lists.&lt;br /&gt;
&lt;br /&gt;
:: There&#039;s some comments about speed of response, but also about having to throttle it to once per frame. I think the sensor API would make that less of an issue.  -- [[User:Argent Stonecutter|Argent Stonecutter]] 20:09, 11 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== llSonar please? ==&lt;br /&gt;
&lt;br /&gt;
I would appreciate if you took in consideration my suggestions at http://jira.secondlife.com/browse/SVC-2486 please; any feedback is more than welcome. &lt;br /&gt;
&lt;br /&gt;
ps:llCastRay is already awesome, you rock! Please try the hardest you can to figure out how to get this to come to the maingrid with the least crippling as possible.&lt;br /&gt;
&lt;br /&gt;
--[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 03:01, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hi Tigro,&lt;br /&gt;
&lt;br /&gt;
If I understand your feature request, it sounds much like the shape cast described in SVC-5381 (http://jira.secondlife.com/browse/SVC-5381) for a sphere or a cylinder cast along its primary axis. Is that correct?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]]&lt;br /&gt;
&lt;br /&gt;
: I have just skimmed thru the comments there, do shape casting allow for somthing liek for example have a nonphys object recognize the geometry so it could rest against a jumbled pile of prims as if it was laying against them physicly? (in the ASCII art in SVC-2486 it would be having the object represented by the O&#039;s resting in the diagonal line as if it was solid) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:44, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:A practical example, imagine a giant mecha, with big flat feet, now imagine a landscape littered with prims of all sorts of shapes and sizes, to make it look realistic, on each step the foot should be rotated to rest against the highest points under it ; just raycasting you have the risk of shooting between prims, and with shapecast you don&#039;t get the rotation for the foot. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 03:04, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== What am I looking at? ==&lt;br /&gt;
&lt;br /&gt;
A function I just threw in to replace phantom bullets for quickly acquiring a point of interest -- whatever your camera&#039;s focused on (in this sim, within 20m) is returned, allowing quicker, more intuitive targeting of other objects.  PERMISSION_TRACK_CAMERA must be previously set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;key camPing() {&lt;br /&gt;
    // End points at the camera and 20m in front of it&lt;br /&gt;
    vector camPos = llGetCameraPos();&lt;br /&gt;
 &lt;br /&gt;
    // Clamp the end position to within the sim&lt;br /&gt;
    // From an SLUniverse post by Chalice Yao&lt;br /&gt;
    // http://www.sluniverse.com/php/vb/scripting/46344-llcastray-available-testing-maybe-only.html#post969497&lt;br /&gt;
    float xSteps;&lt;br /&gt;
    float ySteps;&lt;br /&gt;
    vector camRot = llRot2Fwd(llGetCameraRot());&lt;br /&gt;
    fXSteps = llAbs( ( 256.0 * !!camRot.x ) - camPos.x ) / camRot.x;&lt;br /&gt;
    fYSteps = llAbs( ( 256.0 * !!camRot.y ) - camPos.y ) / camRot.y;&lt;br /&gt;
    if(xSteps &amp;gt; ySteps)&lt;br /&gt;
        xSteps = ySteps;&lt;br /&gt;
    if ( xSteps &amp;gt; 20.0 )&lt;br /&gt;
        xSteps = 20.0&lt;br /&gt;
&lt;br /&gt;
    // Cast the ray; ignore hits on land, otherwise get the root key&lt;br /&gt;
    list contacts = llCastRay( camPos, camPos + ( camRot * xSteps ), &lt;br /&gt;
        RC_REJECT_LAND,&lt;br /&gt;
        RC_GET_ROOT_KEY );&lt;br /&gt;
&lt;br /&gt;
    // Return values&lt;br /&gt;
    if ( llList2Integer( contacts, -1 ) &amp;gt; 0 ) { // Got a return&lt;br /&gt;
        return llList2Key( contacts, 0 );&lt;br /&gt;
    }&lt;br /&gt;
    return NULL_KEY;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[User:Jack Abraham|Jack Abraham]] 06:10, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== RC_GET_LINK_NUM?  Not RC_GET_LINK_KEY? ==&lt;br /&gt;
&lt;br /&gt;
I can&#039;t think of a circumstance where knowing the link number of the return would be useful.  UUID of the prim hit would be far more useful; is that within the realm of possibility? [[User:Jack Abraham|Jack Abraham]] 04:47, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hi Jack,&lt;br /&gt;
&lt;br /&gt;
The default behavior is to return the UUID of the prim hit. If you want the root key instead, you have to use RC_GET_ROOT_KEY. The intended purpose of RC_GET_LINK_NUM was for scripts like your camera targeting system where it is expected that the camera will be pointed at a child of the linkset performing the cast. For example, suppose you make a minesweeper game where each tile is a prim in the linkset. And suppose you script it so that the use can select a tile by focusing on it and clicking. The script could cast a ray from the camera and determine the link number of the tile in the player&#039;s line of sight. Then it could use that link number in an llMessageLinked or some other LSL function to modify the appropriate child prim. Does that make sense? If it turns out no one has any use for RC_GET_LINK_NUM, I&#039;ll eliminate it for the sake of simplicity. But the behavior you&#039;re looking for is already there by default! Yay.&lt;br /&gt;
&lt;br /&gt;
Cheers,&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]]&lt;br /&gt;
&lt;br /&gt;
Makes perfect sense; I need to read better.  Thanks.  [[User:Jack Abraham|Jack Abraham]] 05:44, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Memory concerns ==&lt;br /&gt;
&lt;br /&gt;
Dumping all possible avaible information into a list regardless of whether any of them will be used seems severely wasteful. If you really need to dump all the info as soon as the command is called straight into script memory, at least do somthing like adding a parameter to the command that is a list where each item identifies which pieces of information the scripter wants (like  with llGetPrimtiveParams ) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:51, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I think we basically have that, Tigro; we only get UUID and hit position unless we set additional flags.  Falcon indicated that we will not get all hits in the final version; that&#039;ll further reduce the size of the list. [[User:Jack Abraham|Jack Abraham]] 07:50, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Clamping ==&lt;br /&gt;
&lt;br /&gt;
It would be a waste of server resources if every script has to add clamping code to make sure&lt;br /&gt;
their begin and end are inside the region! Instead, do not return an error code but just stop&lt;br /&gt;
and return only the hits inside the region. That might mean you have to add the clamping code in the&lt;br /&gt;
server, but that would be a hell of a lot more efficient than doing that in the LSL scripts.&lt;br /&gt;
&lt;br /&gt;
Note that clamping is relatively easy, in C++ it shouldn&#039;t cost more than a few microseconds.&lt;br /&gt;
The algorithm would be something like:&lt;br /&gt;
&lt;br /&gt;
1) A bounding box can be given with two vectors: &#039;&#039;bbmin&#039;&#039; and &#039;&#039;bbmax&#039;&#039;, where &#039;&#039;bbmin&#039;&#039; is the bottom,&lt;br /&gt;
south/west corner of the sim (0,0,0), and &#039;&#039;bbmax&#039;&#039; the upper, north/east corner of the sim&lt;br /&gt;
(256,256,4096).&lt;br /&gt;
&lt;br /&gt;
2) Let the ray begin at vector &#039;&#039;begin&#039;&#039; and end at vector &#039;&#039;end&#039;&#039; (using the same coordinate system as the bounding box).&lt;br /&gt;
&lt;br /&gt;
3) Calculate bbmine = bbmin - end, and bbmaxe = bbmax - end. Check if end is outside the sim,&lt;br /&gt;
so clamping is needed at all, by checking that at least one coordinate in bbmine is positive&lt;br /&gt;
or one coordinate in bbmaxe is negative (set &#039;clamping_needed&#039;).&lt;br /&gt;
&lt;br /&gt;
4) Shift coordinates so that &#039;&#039;begin&#039;&#039; becomes the origin and &#039;&#039;end&#039;&#039; becomes the direction&lt;br /&gt;
(bbmin -= begin; bbmax -= begin; dir = end - begin). Lets call &#039;&#039;end&#039;&#039; &#039;&#039;dir&#039;&#039; from now on.&lt;br /&gt;
&lt;br /&gt;
5) Check that bbmin has three negative coordinates and &#039;&#039;bbmax&#039;&#039; has three positive coordinates.&lt;br /&gt;
If not then &#039;&#039;begin&#039;&#039; is outside the bounding box (if the signs are correct, except there are one or more zeroes, it&#039;s on the border&lt;br /&gt;
and you can just return &#039;&#039;begin&#039;&#039;). Not sure if you should return an error code or return just no results.&lt;br /&gt;
Finally, if begin is outside the bounding box, but end was inside, you might want to clamp begin&lt;br /&gt;
instead of end. Lets assume that begin is inside the bounding box for now. If end was also inside&lt;br /&gt;
it, then no clamping is needed and we stop here.&lt;br /&gt;
&lt;br /&gt;
6) Clamping is needed. Calculate dir.x / bbmin.x, dir.x / bbmax.x, dir.y / bbmin.y, dir.y / bbmax.y, dir.z / bbmin.z and dir.z / bbmax.z.&lt;br /&gt;
&lt;br /&gt;
7) Find the largest value &#039;max&#039; of those six and return &#039;&#039;begin&#039;&#039; + dir / max as the collision point of the ray in the direction dir.&lt;br /&gt;
&lt;br /&gt;
As you can see, this is a very fast routine. Still, I think it should be added to the server side.&lt;br /&gt;
I didn&#039;t add code in order to avoid any license problems ;)&lt;br /&gt;
&lt;br /&gt;
[[User:Aleric Inglewood|Aleric Inglewood]] 12:00, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Actually, using SSE2, clamping would take just a few cpu instructions. It&#039;s not a question of efficiency for me, it&#039;s a question of future compatibility. Since we don&#039;t have script versioning for LSL, if we later add the ability to cast rays between sims or change the size of a region, existing scripts will break. I&#039;ve been thinking of adding a version parameter to this function in order to deal with that possibility, in which case I could clamp in native code.&lt;br /&gt;
&lt;br /&gt;
Cheers&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 17:20, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:Definitely, clamping in native code rather than LSL is very desirable.  I&#039;m thinking a version parameter would be best done as a way of accessing old behaviors, similarly to how we have legacy prim types in llSetPrimitiveParams, and optional for the latest version.  What do y&#039;allz think?&lt;br /&gt;
::--[[User:Michelle Resistance|Michelle Resistance]] 15:37, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== return also types casted ==&lt;br /&gt;
&lt;br /&gt;
since filters RC_REJECT_AGENTS, RC_REJECT_PHYSICAL, RC_REJECT_NONPHYSICAL, and RC_REJECT_LAND are used, and therefore detected, it would be handy if in the results returned, the status AGENT, NON_PHYSICAL, PHYSICAL and LAND  would also be returned. Is it douable ?&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been thinking about that. Either I&#039;ll somehow include the type in the list of returned data (perhaps only if you add the flag RC_GET_TYPE or something) or else modify llGetObjectDetails to return the data. You&#039;ll definitely have access one way or the other. Regarding land, though, you can definitively identify that because it will return null UUID.&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 17:20, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Meep ==&lt;br /&gt;
&lt;br /&gt;
Heya Falcon, really would absolutely love to have an llCastRay function in production.&lt;br /&gt;
&lt;br /&gt;
I saw you had a concern of versioning issues. To overcome that, I heavily recommend using a list as an input, as that would be far more flexible on the kind of parameters and options you can push through rather than fooling yourself into using a hardcoded structure of llCastRay(vector start, vector end, other stuff) etc. A bit like how llSetPrimitiveParams works basically. For example in the past, LL upgraded the prim type interface from legacy to a more advanced and flexible set of input (torii, tubes and rings, yey), they could do this easily because a list was used as a parameter in the function, instead of having to expend resources on adding more functions, bloating LSL and causing legacy issues.&lt;br /&gt;
&lt;br /&gt;
I also have a question, when you cast a ray and it hits an avatar, that hits the avatars&#039; actual sphere-ish phys mesh, correct?&lt;br /&gt;
&lt;br /&gt;
I have actually experimented personally with LSL and my custom client with a prototype LSL Script API, I could offload raycast processing into nearby clients easily and even built a half-working hexapod spider that can walk on a prim landscape, as well as all the fun raycasting combat gun stuff :). So, I have some serious experience to share in this field and having the raycasts locally processed would be really useful in a more timely manner (rather than suffering the delays of network lag).&lt;br /&gt;
&lt;br /&gt;
What are your thoughts on the kind of filtering? Whitelist versus Blacklist? Whitelists are apparently more effective based on desire. (Would be good for consistency (which is hard enough to come by..): llSensors, llListen, ...)&lt;br /&gt;
&lt;br /&gt;
On a last note, you might be wondering about my achievement with my custom client, I couldn&#039;t get raycasting weapons taking off because there is a missing critical element to gameplay: Tracers. The user of a gun MUST be able to see WHERE their bullets went (guns use fire cone spread algorithms for added realism). This is one of the significant problems that keep raycasting usage in weaponry really taking off. Otherwise I could have seriously introduced raycasting and changed the face of SL combat with my custom client. If only particle systems could be spontaneously created midair (without requiring the particle system to be &#039;attached&#039; to the prim (it&#039;s possible code-wise in the client btw)) via scripts to simulate tracer effects, then raycasting would seriously be able to take off socially.&lt;br /&gt;
&lt;br /&gt;
--[[User:Nexii Malthus|&amp;lt;span style=&amp;quot;color: #bbb; text-shadow:-1px -1px #ddd, 1px 1px #888;&amp;quot;&amp;gt;Nexii Malthus&amp;lt;/span&amp;gt;]] 02:10, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hi Nexii,&lt;br /&gt;
&lt;br /&gt;
Let me take these one at a time. First, in regard to versioning, LSL lists are very inefficient on the C++ side. They&#039;re implemented as linked lists (yuck). I do see the advantage to using a list for parameters, but it would make parsing it slower and I&#039;d rather pull a Windows API (heh, also yuck) style move and (a) add a reserved version number parameter and (b) if necessary later, create an llCastRayEx function. Not the world&#039;s most extensible implementation, but c&#039;est la vie.&lt;br /&gt;
&lt;br /&gt;
Second, an avatar&#039;s shape isn&#039;t sphere shaped at all...and it&#039;s not a mesh, it&#039;s a convex hull. Its basic shape is kind of like a capsule. I&#039;ll leave the process of determining its exact shape via llCastRay calls with RC_GET_NORMAL as an exercise to the reader. :) (And if you do it, be sure to post pictures! That would rock.)&lt;br /&gt;
&lt;br /&gt;
Third, I&#039;m pushing hard for LL to provide client side prediction/client side physics. Although that wouldn&#039;t immediately lead to client side scripting, it eventually might. And in the meantime, although open source viewers would need to replace the physics module with an open source version (of which there are plenty), you would have a framework for doing physics-based raycasts locally.&lt;br /&gt;
&lt;br /&gt;
Fourth, regarding filtering, it just made the most sense to use blacklists as it&#039;s most common to want to know &amp;quot;What&#039;s the first thing I&#039;m hitting?&amp;quot; It&#039;s less common to want to know &amp;quot;what&#039;s the first avatar/prim/land triangle that I&#039;m hitting?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Finally, after seeing your comment about tracers I looked up the details of llParticleSystem and was astonished to see that, as far as I could tell, you&#039;re totally right. Here&#039;s one idea as a temporary workaround: rez a transparent, phantom, nonphysical sphere (perfect, solid spheres are the simplest physics shape available) at the location you need your particle effect, create it there, and then call llDie(). It sucks, I know, but I&#039;m not a graphics programmer and can&#039;t add an appropriate particle system function. Another idea, though much much less efficient, would be to rez a set of long, colored, phantom cylinders the length of the raycast. It&#039;s still much more efficient than prim bullets since it would be nonphysical and phantom, though.&lt;br /&gt;
&lt;br /&gt;
Hope that helps,&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 05:44, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Avmeshforms.png|256px]]&lt;br /&gt;
Rendering of what the standing and ground sitting av shapes are!&lt;br /&gt;
--[[User:Moy Loon|Moy Loon]]&lt;br /&gt;
: Hahahahah, awesome! :D&lt;br /&gt;
: btw, can you repeat this but with a crouching av as well to confirm there is no change when an av crouches please? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 18:35, 24 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I already know that crouching avs have no change, The sitting on a prim is different than the ground sit though!&lt;br /&gt;
--Moy&lt;br /&gt;
&lt;br /&gt;
== Function to not fail, what do you think? ==&lt;br /&gt;
&lt;br /&gt;
I made this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;list JustRayIt(vector start, vector end, integer filter, integer flags)&lt;br /&gt;
{&lt;br /&gt;
    list temp;&lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
    while((llList2Integer(temp, -1) &amp;lt; 0) || (llGetListLength(temp) == 0))&lt;br /&gt;
    {&lt;br /&gt;
        temp = llCastRay(start, end, filter, flags);&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    return temp;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The idea being to halt the rest of the script until it can get a valid trace; does it work the way i intended it to? Is there any downside to using this? Is there a better way to get the same result? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 04:14, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hi Tigro,&lt;br /&gt;
&lt;br /&gt;
The script you&#039;re suggesting would, sadly, be hugely inefficient. It would hog system resources until the script&#039;s time slice ran out. And, to make matters worse, once you fail you&#039;re guaranteed not succeed until at least the next frame anyway. I&#039;m not a huge lsl scripter, so I&#039;m not 100% sure, but I believe if you added an llSleep(0) call in the while loop, your script would be put to sleep until the next frame. Failing that, try llSleep(0.1) or some other small number.&lt;br /&gt;
&lt;br /&gt;
Good luck,&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 05:29, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:The way it is on the Oatmeals, do tracing ever fail in the frame? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:40, 4 July 2010 (UTC)&lt;br /&gt;
:Also, doesn&#039;t llSleep hog systems resources just the same? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:44, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
On Oatmeal, casts will fail if the overall physics FPS drops too low. It will never fail due to too many raycasts in the same frame, however. In production it will, but I wanted to see how people used it before determining appropriate limits.&lt;br /&gt;
&lt;br /&gt;
llSleep stops execution of your script and allows the simulator to move on to processing another script. It is not implemented as a busy-wait. (At least, I sure hope not. I haven&#039;t actually checked the code.)&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 05:50, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
: How about this version?&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
list JustRayIt(vector start, vector end, integer filter, integer flags)&lt;br /&gt;
{&lt;br /&gt;
    list temp;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    while((llList2Integer(temp, -1) &amp;lt; 0) || (llGetListLength(temp) == 0))&lt;br /&gt;
    {&lt;br /&gt;
        llSleep(0);&lt;br /&gt;
        temp = llCastRay(start, end, filter, flags);&lt;br /&gt;
 &lt;br /&gt;
    }&lt;br /&gt;
    if(llGetListLength(temp) == 1)&lt;br /&gt;
    temp = [NULL_KEY,end, llVecNorm(end-start), 0];&lt;br /&gt;
 &lt;br /&gt;
    return temp;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
: It got the sleep as you suggested, and if it doesn&#039;t hit anything in range it still returns a key, a hit position, a normal (so it kinda works like a telescopic feeler, when not reaching anythign it eventually stops at maximum extension with no deflection), while still keeping llList2Integer(theraylist, -1) == 0&lt;br /&gt;
--[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 19:43, 7 July 2010 (UTC)&lt;br /&gt;
:Ok, i finally managed to get it to wrok right, i think, but hsould i keep posting here clogging the talk page?&lt;br /&gt;
&lt;br /&gt;
== Partially offtopic: about SVC-4606 &amp;quot;Surface conveyour belt&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Falcon, if it&#039;s not you, could you please bring [http://jira.secondlife.com/browse/SVC-4606 SVC-4606] to the attention of whatever Linden that would be able to evaluate it and get it in the plans if it&#039;s possible please? (If it&#039;s you, then please take a look and see what you can do) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 04:43, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I have thought about adding a much, much simpler version of this (where you simply get to specify a velocity vector and a face of the prim), but it would be at least a little tricky to implement and there are a number of things of more general use that I&#039;d like to get to first. Some day, though, it would be a great feature.&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 05:51, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:If the server already knows about which face collided and things like the normal of the collision point (and of course the texture parameters of the prim), wouldn&#039;t it be just a matter of basic vector math to get the resulting force and stuff? I imagine this could be a game changer close to the scale of flexies, people moving around a mall on flat conveyors like those on some airports, working escalators, more realistic wheeled and tracked vehicle behavior, people will find all sorts of uses for it. Is there somewhere i can see the stuff you got planned? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 06:01, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;m about to head out (it IS a Saturday night here, haha), so this is probably my last post, at least for a few hours, probably until tomorrow. The problem is related to stability and details about determining which objects to apply the force to and how. In the physics engine, this would be done by modifying the contact points between the conveyor belt and the other bodies. Also, the server doesn&#039;t really know which face collided, which makes it trickier still, as that info would have to be derived dynamically any time a body came in contact with the conveyor belt object. Finally, it would almost certainly break avatar animations which rely on the avatar&#039;s velocity (not the requested motion of the user) to determine when to play a particular animation. Unfortunately, I don&#039;t have a publicly visible list of projects I&#039;d like to complete. But they do include llCastRay (yay progress!), llCastShape (see SVC-5389...I think...the raycast SVC, exposing the Havok vehicle kit, providing for alternative physics representation (so that the shape you see isn&#039;t tied to the shape the physics engine sees, allowing simpler collision geometry), providing control of friction, density, restitution, and gravity, ... the list goes on. Please bear in mind, however, that there is absolutely no guarantee any of these will be shipped as they are mostly unscheduled it isn&#039;t clear what LL&#039;s priorities will be in the coming months. Oh, and of course, given the opportunity, I&#039;d put all of these ideas aside to work on client side prediction which would have HUGE impact on lag, although it wouldn&#039;t provide much in the way of new resident-facing features.&lt;br /&gt;
&lt;br /&gt;
Have a good night,&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 06:24, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
That partial list of projects is, like, my wishlist as an LSL scripter.  You&#039;re my new favorite Linden. ^_^;&lt;br /&gt;
--[[User:Michelle Resistance|Michelle Resistance]] 15:44, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Some of those are among the feature suggestions i&#039;ve filled on pjira :)&lt;br /&gt;
::Falcon rocks indeed!! --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 16:10, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== selfignoring? ==&lt;br /&gt;
&lt;br /&gt;
Is there a way to have the raytrace ignore prims in the same linkset? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:42, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
No, unfortunately this is not possible and would be hacky to implement (though it could be done if there were enough demand for it). It will, however, always ignore a shape that the ray begins inside of. So if you use llGetPos() from a convex prim, that prim will not be returned by the cast. You can always use the UUID of the prim to ignore the result as well.&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 05:46, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== On the topic of limiting it to not work past a distance ==&lt;br /&gt;
&lt;br /&gt;
It was done with llSensor, and what happened? People wasted server resources to overcome the limitation; you still think it&#039;s a good idea? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 08:04, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Nope. I don&#039;t. But llCastRay isn&#039;t artificially limited to a distance. It&#039;s simply limited to work within the region. But that isn&#039;t an artificial limit, it&#039;s a fundamental one: llCastRay uses the physics engine for raycasts. On a given simulator, nothing exists in the physics world outside the region boundaries.&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 09:47, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hm, sorry, i&#039;m not finding it now, but i could swear i had read you saying somthing along the lines of &amp;quot;you wouldn&#039;t want people raycasting from the other side of the sim&amp;quot;, dunno... --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 09:56, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Yes, I did say that. I then proceeded to change my mind. :)&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 18:59, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Is it a logical bug on my script or does it not update fast enough? ==&lt;br /&gt;
&lt;br /&gt;
Does the data llCastRay reads from gets update as often as the position and rotation of phys objects or does it get updated less often? I&#039;m mostly confident that the start position is inside the prim but somtimes the trace will hit the prim somehow, it happens more often when the prim is bouncing around fast. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 11:23, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
That depends on how you&#039;re updating the objects. If you&#039;re calling llSetPos() or similar in your script, those updates will not be processed until later, whereas the llCastRay call will be processed immediately. I suspect llGetPos() will return the value you set with llSetPos() even though the physics object isn&#039;t there yet.&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 19:01, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;I&#039;m personally praying that llCastRay will make simulated projectile weapons essentially obsolete in SL. &amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
I&#039;ve spent a little time exploring the functionality of llCastRay today. From the perspective of a veteran LL damage combat scripter;&lt;br /&gt;
&lt;br /&gt;
In terms of raw utility, llCastRay effectively provides the ability to determine a bullet&#039;s target without the intervening physics. This is an advantage because it means that traditional region crawl caused by irresponsible people spamming physical objects is significantly reduced. It also means that the number of bullets required to send an individual home is reduced; in the case of the firer being able to aim, of course.&lt;br /&gt;
&lt;br /&gt;
The function seems more fitted to abstracted combat with meters and script awareness (determining distance to surfaces, etc) however, because it provides a very large volume of data back to the script calling it but does not impact what it is detecting in any way.&lt;br /&gt;
While it is possible to build a weapon that uses it for projectiles with traditional LL damage, the benefits do not necessarily outweigh the negatives; it effectively moves the majority of work from the source system to the projectiles instead. Using communications such as listens to transfer a target vector from a gun to a bullet on each rez is obviously absurdly inefficient considering the rates at which most people like to fire them and therefore the cast is better placed in the bullets themselves; this means that the bullets cannot be temporary prior to casting and therefore realistically on rez, although they can simply be set temporary subsequent to casting. Regardless of the method of acquiring the target position, the bullet must still travel to the location to inflict damage; a stacked primparams position is the obvious solution, as it also allows for temponrez and physics to be set in the same call.&lt;br /&gt;
&lt;br /&gt;
Would it be possible to implement a sister (if somewhat crippled) function to llCastRay that has the capability to inflict LL damage on agents? While I see a great deal of value in llCastRay it is not necessarily preferable to physics as a combat tool. Something along the lines of an llCastDamage which is restricted to cast from the root position of the object calling it along a fixed axis. In a similar manner to a sensor, except with a damage variable similar to the llDamage() prim param setter that affects only the first thing it intersects. Additional fluff could be a contact sound triggered at the point of intersection, contact particles and so forth.&lt;br /&gt;
&lt;br /&gt;
tested projectile, just for reference:&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
vector xyz(vector in)&lt;br /&gt;
{&lt;br /&gt;
    if (in.x &amp;gt; 255.9) in.x = 255.9;&lt;br /&gt;
    else if (in.x &amp;lt; 0.1) in.x = 0.1;&lt;br /&gt;
    if (in.y &amp;gt; 255.9) in.y = 255.9;&lt;br /&gt;
    else if (in.y &amp;lt; 0.1) in.y = 0.1;&lt;br /&gt;
    if (in.z &amp;gt; 4095.9) in.z = 4095.9;&lt;br /&gt;
    else if (in.z &amp;lt; 0.1) in.z = 0.1;&lt;br /&gt;
    return in;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llCollisionSound(&amp;quot;&amp;quot;,0.0);&lt;br /&gt;
        llCollisionSprite(&amp;quot;&amp;quot;);&lt;br /&gt;
        llSetDamage(100.0);&lt;br /&gt;
    }&lt;br /&gt;
    on_rez(integer s)&lt;br /&gt;
    {&lt;br /&gt;
        if (!s) return;&lt;br /&gt;
        vector p = llGetPos();&lt;br /&gt;
        vector d = &amp;lt;20.0,0.0,0.0&amp;gt;*llGetRot();&lt;br /&gt;
        list ray = llCastRay(p,xyz(p+d),0,0);&lt;br /&gt;
        list tgt = [PRIM_POSITION,llList2Vector(ray,1)];&lt;br /&gt;
        tgt += tgt += tgt += tgt += tgt += tgt;//1,2,4,8etc&lt;br /&gt;
        llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_TEMP_ON_REZ,TRUE]+tgt+[PRIM_PHYSICS,TRUE]);&lt;br /&gt;
        llDie();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
[[User:Jeremy Duport|Jeremy Duport]] 19:51, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== This is *not* a viable replacement for projectiles ==&lt;br /&gt;
&lt;br /&gt;
llCastRay is a great idea, and I&#039;ll make heavy use of it in a wide range of applications, but there&#039;s no way it&#039;s going to replace scripted bullets in any meaningful way.&lt;br /&gt;
&lt;br /&gt;
There&#039;s just no other way to get a decent visual effect for bullets.  Particles are an enormous performance drain on the client [and don&#039;t anyone tell me to just get a better machine, I&#039;m a poor student, damnit], and of course look the same from every direction.  Scripted bullets are also the only timely way to get a particle effect at unscripted impact locations.&lt;br /&gt;
&lt;br /&gt;
There&#039;s also the problem of communicating effectively between a gun and a scripted target.  With combat going on, something like a listen on targets and regionsay from guns is going to trigger zillions of unnecessary events.  Sure, *I* know how to properly hash UUIDs to integers, and there&#039;s reasonable code for that on this wiki, but have you actually seen the kind of shit most scripters in SL try to pull?  Note that people are *still* using resizer scripts in every prim of a linkset and controlling them with linked messages.&lt;br /&gt;
&lt;br /&gt;
Also, despite being sidetracked by https://jira.secondlife.com/browse/SVC-5953, I&#039;m a week or so of work away from releasing several weapons that trigger bullet rezzes via changed events, rather than by inked messages. Tyro Dreamscape has already successfully demonstrated this method as a near-zero-sim-impact way of squeezing high firing rates of scripted bullets out of as few rezzing scripts as possible.  Sure, you could bring up sim garbage collector woes, or my argument from above about the absurdly low coding standards among scripters, but the former has not been an issue in practice, at least with intentionally minimalist bullet scripts, and the latter is something I&#039;m expecting market forces to help with.  We *can* do scripted bullets the right way.&lt;br /&gt;
&lt;br /&gt;
I&#039;d really like someone to prove me wrong.  Thoughts?&lt;br /&gt;
&lt;br /&gt;
--[[User:Michelle Resistance|Michelle Resistance]] 15:55, 5 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ummm, you do realize that you&#039;re still just calling a function in one script, that triggers an event in another, right?  Except that where a linked message merely communicates between scripts, the changed() event requires triggering a function that changes some parameter of the other object, so you&#039;re asking the simulator to do a small bit of extra unnecessary work in between calling the function and triggering the event.&lt;br /&gt;
&lt;br /&gt;
You are right that scripted bullets can be done the right way.  But the right way doesn&#039;t mean reinventing the wheel or creating a Rube Goldberg machine, it requres understanding what the wrong way is, why certain things use extra processing resources, and finding the most effective ways to mitigate those problems.  Keep in mind that people have tried to use llResetOtherScript() and actually believed that it was more efficient.  It was the same sort of reasoning involved, where someone thought &amp;quot;method A is laggy, therefore method B will be better.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is quite possible to make efficient physical projectile weapons.  But just because many people are unable to do so does not mean that you need to find some supersekret new method for doing so.  It is simply a matter of using good coding practices like KISS.  Granted, it&#039;s oh so much easier to market something that&#039;s new and different, but that doesn&#039;t make it so.&lt;br /&gt;
&lt;br /&gt;
[[User:Jahar Aabye|Jahar Aabye]] 19:24, 5 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Passing data through a changed event, at least the way Tyro and I have been doing it, has far less impact on the sim than the string operations that most people do when communicating between scripts via link messages.  Try it, it&#039;s rather impressive.  And, to dispel concerns that it&#039;s just a gimmick, I&#039;ll explain exactly what I&#039;m doing and (probably) why it works better.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve got a main script and several rezzer &amp;quot;thread&amp;quot; scripts, all in the same prim (they don&#039;t need to be, but that&#039;s how I&#039;m doing it), a hollow sphere.  When a user pulls the trigger (or an automated weapon decides to open fire), llSetColor(&amp;lt;AUTO, timer, aim&amp;gt;) is called [llSetLinkColor also works, though llSetLinkPrimitiveParams and the fast variant don&#039;t, as they don&#039;t trigger a changed event], where AUTO is a predefined floating-point number identifying that it&#039;s a firing order, timer is the argument we want the thread to past to llSetTimerEvent to control the firing rate, and aim is either 1.0 or 0.0, signifying if I&#039;m using the prim&#039;s other face to provide additional data about where to aim the bullets (which we can do without triggering a second changed event, if the llSetColor call for the other face is done immediately before or after the firing-order call).  This has been significantly more responsive (in LSO, anyhow) than a linked message in all my tests, and can easily support rather egregious firing rates [~25 bullets per second with five threads - well under the goo fence limit, though probably more than you&#039;d want] from many simultaneous users without affecting sim FPS.  My team&#039;s theory, that led us to try this in the firs place, was that the link_message dispatch code on the sim side is slowed by argument passing and filtering in a way that the changed event is not.  That we&#039;re only performing floating-point operations when using face color as an argument buffer seems to make the difference.  Certainly, one could use the link_message integer parameter to do filtering, and I write all my APIs that way, but it appears the extra overhead of passing string and key arguments, even when not used, is enough to upset the sim when performed at high speed.  As a side benefit, using the changed event keeps the rezzer threads from needing link_message handlers, reducing the number of scripts that need to filter out other communication happening in the linkset.&lt;br /&gt;
&lt;br /&gt;
Hope that allays your concerns.  If not, I&#039;ll be here all week. ~_^&lt;br /&gt;
&lt;br /&gt;
--[[User:Michelle Resistance|Michelle Resistance]] 23:06, 5 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::Well yes, you&#039;re simply shifting a portion of the load from the VM (which would handle the linked messages) to the Database and Simulator (which are handling the altering of the primitive&#039;s parameters and which then triggers the VM&#039;s changed() event).  This does not make it particularly more efficient, as I mentioned before you still have a function call and an event triggered, you&#039;re merely routing it through another method, in this case the simulator, which has to then alert every client within draw/LOD distance as to the nature of the change.  I am fully aware of what you are doing and how you are doing it, you are at least the third person in as many years who has mentioned it.&lt;br /&gt;
&lt;br /&gt;
::Rather than a lecture on how to script guns, I&#039;ll simply say that if it works for you, then that&#039;s all that matters.  There are efficient ways to use linked messages, and there are incredibly inefficient ways to use linked messages.  Similarly, I am certain that people will find right ways and wrong ways to handle llRayCast() if it is ever implemented.  Incorrect methods will undoubtedly spread through the grapevine with assurances that &amp;quot;this supersekrit way is teh best evar!!!11!!&amp;quot;  Market forces have as of yet had minimal effect on poor scripting with regards to guns in SL, I wouldn&#039;t expect that to change at any time in the future.  As you correctly note, many fashion designers still put resize scripts into every prim of hair.&lt;br /&gt;
&lt;br /&gt;
::In some respects, I doubt that many amateur gun scriptors will be much different after raycasting than before.  It may be less likely to be used by many amateur gun scripters simply because the default LL Damage system is built around physical collisions, and presumably that would remain the same.  Also, combat systems that use raycasting would likely require at least a decent understanding LSL or else might use prewritten no-mod scripts to do the raycasting.  To that extent, I do worry that raycasting may appear to be more efficient when it debuts on the grid, if only because of self-selection in terms of who is using it and how it is used.  This is probably something that should be considered if llCastRay() is ever implemented, as it does have an effect on how to interpret any sort of metrics gathered when trying to determine its relative efficiency compared to bullet-based guns.&lt;br /&gt;
&lt;br /&gt;
::In the end, it will be one more tool.  I would hope that the devs at LL do not really think that this will completely replace physical projectiles, but it is nice to have the option.  Similarly, I do hope that people understand that the relative efficiency of various guns on the grid varies wildly, and that the scriptor has a far greater impact on the relative efficiency of a gun than whether it uses physical bullets or llCastRay() when it is implemented.&lt;br /&gt;
&lt;br /&gt;
[[User:Jahar Aabye|Jahar Aabye]] 00:18, 6 July 2010 (UTC)&lt;br /&gt;
::: Latelly i&#039;ve been using llTarget and not_at_target to have stuff run as fast as the server allows without actually using somthing like while(true) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 00:31, 6 July 2010 (UTC)&lt;br /&gt;
:::: In my tests, I&#039;ve found that LSO loops seem to end up *slower* than repeating events like timers and not_at_target.  &#039;Sweird. --[[User:Michelle Resistance|Michelle Resistance]] 00:47, 6 July 2010 (UTC)&lt;br /&gt;
:You could use llRayCast to verify if the aiming hits anyone,and then rez a &amp;quot;bullet&amp;quot;, posJump it to the target and make it phys to collide if you wanna use collisions to relay hits. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 23:57, 5 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Actually, that would probably be the worst of all worlds.  You&#039;re still rezzing a bullet, still moving it to the target, still making it physical, still colliding it.  All of the things that llCastRay() is attempting to prevent.  Also, most combat systems that involve collisions limit (or should limit) the minimum velocity of a collision.  To get around this, one would probably have to add a call to llApplyImpulse() or something similar.  At the end of the day, you wind up with a situation not much better off than just firing a bullet.&lt;br /&gt;
&lt;br /&gt;
:::llCastRay() is probably best implemented in a combat system in a manner similar to current sensor-based combat systems, which have been around for years.  I&#039;m not sure that sensor-based (or raycasting-based) combat is any better or worse than physical bullet-based combat.  Each has different tradeoffs, and at the end of the day it&#039;s going to come down to how these functions are worked into the system that gets set up.  Whether using sensors, raycasting, or bullets, it&#039;s all about understanding the strengths and weaknesses of each system, and working with that in mind.  Raycasting does have some significant strengths, but only if you take advantage of them.  Raycasting, if done correctly, will probably take some load off the physics engine at the possible cost of runtime efficiency and memory.  Physical bullet systems are simpler and may have an advantage in terms of runtime efficiency and memory use if done correctly, at the expense of offloading more of the work on the physics engine that has to deal with all of the active objects and the collisions generated.&lt;br /&gt;
&lt;br /&gt;
[[User:Jahar Aabye|Jahar Aabye]] 00:18, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Ahoy folks!&lt;br /&gt;
&lt;br /&gt;
I don&#039;t know enough about the issues in LSL to comment on most of the topics brought up in this thread. But with regard to the issues around the appearance of raycasts vs rezzed bullets, once you use llCastRay, you&#039;ll at &amp;lt;i&amp;gt;least&amp;lt;/i&amp;gt; be able to set your bullets phantom. This prevents the physics engine from needing to check for collisions with anything but the land. Unfortunately, due to an old bug, collision checks against the ground are still very expensive. We expect to fix this by 1.44 at the latest. Once that&#039;s done, phantom bullets will be much more efficient.&lt;br /&gt;
&lt;br /&gt;
::Phantom bullets would give us the problem of having to inform them somehow of a hit so they can [promptly] self-destruct instead of continuing to pass through things… unless you&#039;re suggesting the bullets themselves do llCastRay and short circuit the physics system.  That sounds like a terrible hack, though.  Shouldn&#039;t it be more efficient to let the physics engine do its thing, rather than going through the twisty little passages of LSL VMs? --[[User:Michelle Resistance|Michelle Resistance]] 17:02, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Regarding the matter of rezzing a bullet and then using the posjump trick (assuming that refers to the llSetPrimitiveParams hack where you repeatedly set the prim&#039;s position in a second call), that will actually be substantially less inefficient in 1.40 (when we finally get it right!). The reason is that in the past, each time you set the prim&#039;s position, the physics world would be updated, sometimes many many times in a frame. That is no longer the case (only the final position is actually used).&lt;br /&gt;
&lt;br /&gt;
::&amp;quot;[[PosJump]]&amp;quot; actually refers to a different &amp;gt;10m movement hack than what you&#039;re talking about, which is known as &amp;quot;[[WarpPos]]&amp;quot;.  PosJump is very much preferable, as the LSL script doesn&#039;t have to waste time and memory calculating a series of intermediate steps… but it doesn&#039;t work with llSetLinkPrimitiveParamsFast, just the slow variety. --[[User:Michelle Resistance|Michelle Resistance]] 17:02, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Last i tried it did work with llSetLinkPrimitiveParamsFast, did you test it yourself? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 17:31, 6 July 2010 (UTC)&lt;br /&gt;
::::Yes, just a few weeks ago… though now that I think about it, I could have been confusing the issue with that posjump fails when the object is physical. --[[User:Michelle Resistance|Michelle Resistance]] 16:54, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
And yes, an LSL busy loop (e.g., while(TRUE)) is very, very inefficient. It uses as much of the sim&#039;s resources as available until it is cut off for the frame. Even the most inefficient event scheme would probably be better than a busy loop.&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 03:25, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::I&#039;ve found that even a bounded for loop is slower than a timer, in practice.  Any idea why this might be? --[[User:Michelle Resistance|Michelle Resistance]] 17:02, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
In LSO it makes sense that using [[changed]] would be faster than the [[link_message]]. The changed event has one parameter, link_message has four; two of which are strings. It takes more computer time to push a link_message event onto a scripts event queue then it does to push a changed event. It takes more time to copy the values into script memory and trigger the event. Mind you, using [[llSetColor]] this way is going to cause a huge number of updates that the sim will try and send to all users in sight of the weapon. For a long time I thought we need a better comm event, no string, no key, just a list. Than I latched onto C# and the idea of building custom events. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 16:21, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Possibility to limit list length? ==&lt;br /&gt;
&lt;br /&gt;
I am concerned about the memory issues posed by this function.  It was mentioned above, but not really fleshed out.  In order to be useful for a combat perspective, you can&#039;t really set any of the flags (that is, it must return all agents and objects) so that you know whether there is a wall or some other barrier between yourself and the target.  This means that you can get a potentially very long list with a UUID and vector position for each object hit.  This could easily eat up several kb of script memory.&lt;br /&gt;
&lt;br /&gt;
However, limiting the function to returning the first object hit (as has been mentioned as the possible final version) also removes some potentially interesting uses of this function.  For example, you could have a situation where you get one result if it reaches an avatar unimpeded, another if there is a single object between you and the other av, and then no result if there is more than one object.&lt;br /&gt;
&lt;br /&gt;
Would it be possible to compromise, and add another variable to input into the function to select the total number of objects to return?  So you could have: &lt;br /&gt;
&lt;br /&gt;
list llCastRay(vector start,vector end,integer filters,integer flags,integer num_returned)&lt;br /&gt;
&lt;br /&gt;
Where num_returned would be the total number of objects hit, starting with the closest.  It could be enumerated starting from 0 so as to match the values in the returned list, or from 1 if you would need to use 0 to set it to no limit.&lt;br /&gt;
&lt;br /&gt;
As for this function making physical projectile combat obsolete, I do not believe that this will happen.  I see this as akin to how sculpties have enhanced building: they give builders more options and allow for a greater variety of creative designs, but they have not obviated the use of regular prims.  Similarly, I think that this feature may increase the options available when developing combat systems and weapons.  However, I think that there are advantages to physical projectiles (such as the ability to code for ballistic trajectory).  I have used sensor-based combat systems before (although this has many advantages over those as well), and I have found that those feel a bit too much like playing &amp;quot;laser tag&amp;quot; especially when used over longer distances.&lt;br /&gt;
&lt;br /&gt;
I think that this will create more options for combat, it may allow for new types of combat, but there are always tradeoffs inherent in any system.  Raycasting methods will have advantages and disadvantages, they will be more efficient in some ways and less in others.  It will be nice to have this as a new option, but I worry about overselling this as a complete replacement.  After all, the Mono VM was marketed as being the wave of the future that would make LSL-compiled scripts obsolete.  While many scriptors knew to be cautious with a new VM, LL&#039;s overhyping of the system created a marketing environment where customers were asking if every product was Mono.  This resulted in Mono being used in a vast number of situations where it was not only unnecessary but entirely inappropriate.  &lt;br /&gt;
&lt;br /&gt;
I worry about a similar situation unfolding here, where marketing llCastRay as a complete replacement for physical projectiles will encourage non-technical people to demand &amp;quot;those new ray guns LL keeps telling us about, why haven&#039;t you been making those?&amp;quot;  Then these same people will inevitably come back a week later demanding why the RayCast &amp;quot;bullets&amp;quot; behave differently.  All that I am asking is that you please acknowledge that non-technical people will read these announcements without understanding the technical nuance and the inherent tradeoffs.  Overhyping something as a &amp;quot;complete replacement&amp;quot; when it is a new feature that allows for new options may only wind up creating new headaches.  A new feature that opens new doors and allows for new options for creators is great, it is wonderful.  No need to oversell a good thing.&lt;br /&gt;
&lt;br /&gt;
[[User:Jahar Aabye|Jahar Aabye]] 19:24, 5 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
In the final version of llCastRay, if more than 1 hit can be returned I&#039;ll be sure to give you the ability to select some kind of limit (even if it&#039;s only a binary &amp;quot;first hit or all N hits&amp;quot; choice--where N is definitely a finite number determined by the specification). &lt;br /&gt;
&lt;br /&gt;
Also, if using llCastRay feels too much like laser tag, try adding a small delay before the raycast executes or adding some randomness to the cast&#039;s direction. As for the ballistic trajectory, if that&#039;s really critical, there are ways to simulate it. For example, you could make 4 ray casts approximating the parabolic curve, but you&#039;d have the possibility of performing an early-out if one of the first casts hits something.&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 03:33, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Yes, randomness for the direction is easily doable by modifying existing code.  What I meant about ballistics isn&#039;t just the trajectory, drop, and inaccuracies like random variations in direction.  A delay before firing can be done, but one factor in the current projectile combat is that your aim is highly dependent upon the distance to your target and how this relates to the target&#039;s movement.  With projectiles, it is far easier to hit a close target than a far one, and if the target is moving, this has a disproportionate impact on difficulty with a farther target.  This is because of the time that it takes for the bullet to reach the target, because the bullet&#039;s travel is not instant.&lt;br /&gt;
&lt;br /&gt;
::Now, because SL physics limits bullet velocity to far less than in real life (our SL bullets are usually 115 m/s while a 5.56mm round from an M16 is well over 900 m/s), the result is that it greatly exaggerates the effects of distance and movement, but distance in SL is always a somewhat arbitrary measurement.  So I recognize that physical projectiles are far from perfect, and plenty of people have complained of difficulty when they first try SL combat after experience with other video and computer games that probably are using raytracing or similar technology.  But it does add a satisfactory level of difficulty and skill to competitions.&lt;br /&gt;
&lt;br /&gt;
::I know this is probably not feasible, and I certainly don&#039;t want it to wind up polluting the code and making everything more difficult, but is there any way to give the ray a specific velocity, rather than being nearly instant?  I&#039;m not just talking about a delay between the firing input and casting the ray, but having the ability to set the ray to move at a specified speed so that distance to target matters?  I mean, I suppose that I could fire multiple staggered rays to try to imitate this, and have the script read data from each successive ray only between certain distances....but that&#039;s gonna get really inefficient really fast, while the simulator is already calculating avatar distance and movement.&lt;br /&gt;
--[[User:Jahar Aabye|Jahar Aabye]] 05:47, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Hey Jahar, I see what you&#039;re saying, but no, there&#039;s no way to slow down the ray, it&#039;s a synchronous, instantaneous query into the physics world&#039;s current state. You&#039;ll just need to come up with a new clever way to inject difficulty into things :) (I&#039;m usually terrible at first person shooters and those have stupid AIs and instantaneous raycasts. I&#039;m sure a group of human enemies can find a way to make hitting them challenging while still being fun, even if the bullets travel faster now.) Also, given that the physics hitbox of a player is pretty narrow, I&#039;m guessing it may be harder than you expect to hit a moving target from the other side of the sim, even with a raycast. But then, I haven&#039;t tried.&lt;br /&gt;
:::[[User:Falcon Linden|Falcon Linden]] 03:46, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Raycast Damage ==&lt;br /&gt;
&lt;br /&gt;
Hey folks,&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been trying to coalesce some of the most significant suggestions for llCastRay, and one theme that seems consistent is that weapon system makers need a way to be notified when hit by a ray. I&#039;m thinking of two possible features:&lt;br /&gt;
&lt;br /&gt;
1) For integration with LL damage, it might be possible to create another parameter that takes a list of parameters (albeit with a bit more strict requirements than in primparams args due to inefficiencies in list processing). In the future, this could include a version number, but in the meantime, one possible parameter could be RC_DAMAGE which would apply a requested amount of damage to the first object hit if that object is an avatar and if the region is damage enabled, etc.&lt;br /&gt;
&lt;br /&gt;
2) An event, ray_impact, that the caster script could choose to trigger in impacted objects. This would, in principle, alleviate many of the security concerns around raycast-based weapons systems. In the interests of full disclosure, however, I should tell you that (a) I don&#039;t know how to create a new event (I&#039;ll have to speak to Kelly Linden) and therefore, (b), I don&#039;t know if implementing this feature would be prohibitive in terms of engineering time. But let&#039;s suppose I &amp;lt;i&amp;gt;could&amp;lt;/i&amp;gt; implement this. What information would you want the receiving object to be able to obtain in this event? The fewer the better, so my first instinct would be no information (it&#039;s enough to know you were hit). Beyond that, knowing the exact location of the hit could be nice, as would knowing the UUID of the casting object (maybe?) and perhaps receiving bit of user data provided in the llCastRay call. Would that be helpful? How might you use it?&lt;br /&gt;
&lt;br /&gt;
Cheers,&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 03:47, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: #1 sounds excellent, though it&#039;s been notoriously difficult to get people to play fair with LL damage.&lt;br /&gt;
&lt;br /&gt;
:: A ray_impact event would be a godsend.  The UUID of the casting object would be essential, and a hit location [and maybe hit normal] would be very useful.  Ideally, an appropriate set of llDetected* functions should work inside the ray_impact event similarly to how they&#039;re used in a touch event.  Might need a new one, like llDetectedRayNormal.  Still, just an event with a signature like ray_impact(key id, vector pos, vector norm) would be massively useful.  Let&#039;s see… I&#039;d be using llCastRay for collision avoidance on robots, and ray_impact would make it easier for the robots to exhibit schooling behaviors.  Similarly, such robots could interact with scripted objects in their environment (door controls, moveable boxes?) elegantly.  Other uses… target ranges for raycast-based weapons… missile lock detection in fighter combat… assuming we could use it in attachments for impacts to the avatar, combat meters for raycast-based guns… AR-like user interfaces implemented by raycasts from a HUD [though the math for generating such rays may be rather complicated]… line-of-sight communication between objects and avatars… I&#039;m sure there are more that I can&#039;t think of at the moment.  Bottom line, adding functionality to LSL is a Very Good Thing. --[[User:Michelle Resistance|Michelle Resistance]] 17:46, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Falcon, I&#039;ve been silent on this point because I don&#039;t agree with the naysayers; &amp;lt;tt&amp;gt;llCastRay&amp;lt;/tt&amp;gt; is exactly what I&#039;ve been needing for the combat system I&#039;m building.  For those that want to use Linden Damage, I think &amp;lt;tt&amp;gt;llTakeDamage()&amp;lt;/tt&amp;gt; (perhaps accepting negative values to allow for healing) would be valuable, but beyond the scope of this project.  I don&#039;t personally hold with the logic that it&#039;s marginally hard to write non-laggy chat communications, so we should expect people to write non-laggy bullets and guns.  It&#039;ll require combat to be done differently, so it&#039;s not an evolutionary change, but I don&#039;t see that as a barrier.&lt;br /&gt;
&lt;br /&gt;
That said, if it can be done, RC_DAMAGE would be a nice thing to have.  I do build my weapons to fail down to Linden damage if no supported combat system is found, and if Linden damage is enabled.  &amp;lt;tt&amp;gt;ray_impact&amp;lt;/tt&amp;gt; would also be nice, especially if it&#039;s only explicitly triggered; UUID, impact point, and an arbitrary integer constant sent by the ray caster would be the values I&#039;d see as most useful.  Perhaps rather than go the whole list of parameters route for RC_DAMAGE, just add another integer parameter to &amp;lt;tt&amp;gt;llCastRay&amp;lt;/tt&amp;gt; that would be used differently with different flags?  In any event, not having either of these would in no way dampen my enthusiasm for this feature or impact my plans for using it, assuming it gets deployed. [[User:Jack Abraham|Jack Abraham]] 19:23, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::I think that suggestion #1, or some similar functionality, would be essential if you want this function to work with the current default LL Damage system.  The LL Damage system currently requires a physical collision between an avatar and an object scripted with llSetDamage().  This means that I can simply fire a bullet at an avatar and apply damage, but raycasting alone would not be able to perform any sort of damage without also requiring some sort of bullet unless you add this feature.&lt;br /&gt;
&lt;br /&gt;
::Suggestion #2 also sounds useful, if possible.  I suspect that many people will still utilize weapon-meter comms even if you include this function, because there is still greater security there in terms of being able to limit what can do damage within a system.  However, Michelle outlines many other excellent uses for including this feature.  In addition to making it far easier to construct non-avatar targets, it dramatically increases the potential usage for raycasting beyond just a replacement for projectiles.  I was just talking to a plane maker last night about how raycasting could make laser-guided bombs far more interesting, and while that example wouldn&#039;t require this extra feature, it does illustrate that raycasting can evolve into so many other things besides just a bullet, and so adding in the feature to detect a raycast may expand the use of raycasting into all sorts of applications beyond what any of us could envision.&lt;br /&gt;
&lt;br /&gt;
::As for what information might need to be passed?  Jack&#039;s suggestion of adding an all-purpose integer definitely sounds like the most important.  Obviously an integer would be required to set damage, and having the ability to send an integer with a raycast would also allow for expanded use outside of LL Damage.  It could allow a weapons system to differentiate between raycasts of different &amp;quot;caliber&amp;quot; or allow for raycasts to broadcast a &amp;quot;team&amp;quot; number, or to differentiate between raycasts being used as &amp;quot;projectiles&amp;quot; from those being used as &amp;quot;lasers&amp;quot; or in some other sensing capacity, or a million other situations where the ability to program an object with multiple responses to a raycast would dramatically expand its utility.  An integer is also the simplest piece of information that could be added, and you&#039;ll need to add it anyways if you add LL Damage functionality.&lt;br /&gt;
&lt;br /&gt;
::The UUID of the originating object would also be useful, as would the owner&#039;s UUID.  While it may sound redundant, I wonder about situations where the owner of the originating object might not be in the region, I believe that llGetOwnerKey() may not work in those situations, right?  So the owner UUID would be important.  It might also be useful for llCastRay() to send a UUID of its own choosing, and here I&#039;m thinking of how it is common in SL aviation for planes to be guest-flyable, so the owner of the object may not be the one using it.  However, workarounds already exist for this with bullet-based combat systems, so maybe it&#039;s not essential.  Of course, if it simply broadcast a UUID (or string) of the scriptor&#039;s choosing, that would allow whoever is scripting the object to decide whether to send the object UUID, the owner UUID, or the user&#039;s UUID, so it might be even better than automatically sending the object and owner UUIDs.&lt;br /&gt;
&lt;br /&gt;
::Finally, it might be useful to include the vector position of the originating point of the raycast.  Not where it hits you, but where it was sent from.  Granted, if the object/owner/user UUID is included, then llGetObjectDetails() might be used to get this information, but for some instinctive reason that I can&#039;t quite figure out at the moment, I feel like this might be a useful thing to add.  In the end, though, if you have to include one bit of information, make it all purpose integer that could be used to determine LL Damage or passed to an event.  If at the end of the day you can only pass on one piece of info, an integer would give you the most utility with the least overhead.&lt;br /&gt;
&lt;br /&gt;
::[[User:Jahar Aabye|Jahar Aabye]] 06:43, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:::How about the shooter just sending the info about how the shot originated (also thigns like the gun used etc) via chat and then the potential target(s) calculate whether they were hit or not and adjust their owner health points as needed? (I just thought about that approach, haven&#039;t put much thought into it)&lt;br /&gt;
::: Btw, does everyone uses gravitiless bullets? I would expect people going for the more realistic stuff would use physical bullets that fly a ballistic trajectory... Can a ballistic arc be used instead of a straight line &amp;quot;ray&amp;quot;  with raycasting? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 06:56, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::Tigro, in real life, a 9mm round of typical self-defense ammunition has a muzzle velocity of 1120ft/s or 340m/s. As another commenter pointed out, a 5.56 NATO round (think M16) has a muzzle velocity of about 3000ft/s or 915m/s. Those two rounds would travel a sim diagonal (362m) in 1.06 and  0.4s, respectively. During that time period, if fired horizontally, they would fall about 5.5m and about 0.79m, respectively. Sounds like a lot, except that a pistol wouldn&#039;t have a range anywhere near that large in reality (you couldn&#039;t POSSIBLY aim a pistol accurately at a target nearly 4 football fields away, at least not by hand, and not without some kind of crazy scope...not to mention that wind would slow it down substantially over that distance) and for the M16, the drop is not significant given the 350m distance being traveled. So while no, you can&#039;t use a ballistic arc instead of a straight line, think about whether you really need to. And if you discover you really do, you could always approximate it with 4 line segments. &lt;br /&gt;
::::[[User:Falcon Linden|Falcon Linden]] 04:04, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Get Alt-Zoom camera cursor position and surface orientation ==&lt;br /&gt;
&lt;br /&gt;
Here is an example I made, how to get the camera cursor position when you Alt-Zoom on any object surface with the &#039;&#039;&#039;llCastRay&#039;&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
The script also calculates the surface orientation at the cursor position and rezes a prim on a top of surface. The Z-Axis of a rezed prim is aligned with the Normal vector of a surface at a given point and the X-Axis points in a way of your camera sight.&lt;br /&gt;
&lt;br /&gt;
To test the script make a new HUD object and put the script below into it. Also put one standard cube prim (named Object) into its inventory. Attach the HUD and Alt-Zoom to any curved surface in region, but not more than 10m far from you. Then click on the HUD and a new prim will be rezed on a top of surface where the Alt-Zoom cursor of your camera points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
//                    &lt;br /&gt;
//      Scriptname:  Get Alt-Zoom position and Surface Orentation&lt;br /&gt;
//      Version:     1.0&lt;br /&gt;
//      Date:        06.07.2010&lt;br /&gt;
//&lt;br /&gt;
//      Description: Gets the position of the camera cursor&lt;br /&gt;
//                   when a user Alt-Zumes on a surface of any object and&lt;br /&gt;
//                   rezes a prim on this point and orients it with a surface&lt;br /&gt;
//&lt;br /&gt;
//      How To:      - Create a new HUD (cube), size = X=0.05 y=0.05 Z=0.05&lt;br /&gt;
//                   - Put this script on it and attach it as a HUD&lt;br /&gt;
//                   - Insert a standard prim (Cube 0.5m) into HUD inventory (named as Object)&lt;br /&gt;
//                   - Alt-Zoom with your mouse to any object surface in the region&lt;br /&gt;
//                   - Without moving your camera, click on this HUD&lt;br /&gt;
//                   - You will get the camera cursor position and surface orentation&lt;br /&gt;
//                   - An Object from HUD inventory will be rezed on a top of Alt-Zoomed surface&lt;br /&gt;
//                     perfectly aligned with surface and with X-axis pointed to your line of sight&lt;br /&gt;
//&lt;br /&gt;
//      Tips:        To see the camera cursor, enable: Advanced-&amp;gt;Character-&amp;gt;Show Look At in your Advaned Menu&lt;br /&gt;
//                   Rez a big sphere to make a curved surface in a region and Alt-Zoom on it.                 &lt;br /&gt;
//&lt;br /&gt;
//      Notes:       You must be at least 10m close to Alt-Zoom position (llRezObject() limitation)&lt;br /&gt;
//                   There&#039;s no &amp;quot;clamping code&amp;quot; included to cut the rays to be inside of a region&lt;br /&gt;
//&lt;br /&gt;
//      Creator:     Teleworm Gelber&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        if (llGetAttached() &amp;gt; 0)&lt;br /&gt;
        {&lt;br /&gt;
            llRequestPermissions(llGetOwner(), PERMISSION_TRACK_CAMERA);&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            llOwnerSay(&amp;quot;Attach me as a HUD&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    run_time_permissions(integer permissions)&lt;br /&gt;
    {&lt;br /&gt;
        llOwnerSay(&amp;quot;Alt-Zoom on any curved surface in the region and then click me to get the Alt-Zoom cursor coordinates and an Object will be rezed there&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        vector   camPos;        // camera position&lt;br /&gt;
        rotation camRot;        // camera rotation&lt;br /&gt;
&lt;br /&gt;
        vector   rayEnd;        // ray end vector&lt;br /&gt;
&lt;br /&gt;
        vector   curPos;        // Alt-Zoom cursor position&lt;br /&gt;
        rotation curRot;        // Point on a surface rotation (Z-axis = SurfaceNormal, X-axis = line of sight)&lt;br /&gt;
&lt;br /&gt;
        vector   fwd;           // surface Forward vector&lt;br /&gt;
        vector   left;          // surface Left vector&lt;br /&gt;
        vector   normal;        // surface Normal vector&lt;br /&gt;
&lt;br /&gt;
        list     rayData;       // ray cast return data&lt;br /&gt;
&lt;br /&gt;
        if ((llGetPermissions() &amp;amp; PERMISSION_TRACK_CAMERA) != 0)&lt;br /&gt;
        {&lt;br /&gt;
            // getting camera location&lt;br /&gt;
            camPos = llGetCameraPos();&lt;br /&gt;
            camRot = llGetCameraRot();&lt;br /&gt;
&lt;br /&gt;
            // Cast a ray in a line of your sight (10.0 means llRezObject() limitation)&lt;br /&gt;
            rayEnd   = camPos + 10.0 * llRot2Fwd(camRot);&lt;br /&gt;
&lt;br /&gt;
            rayData = llCastRay(camPos, rayEnd, 0, RC_GET_NORMAL);&lt;br /&gt;
&lt;br /&gt;
            if (llList2Integer(rayData, -1) &amp;gt; 0)   // check status code&lt;br /&gt;
            {&lt;br /&gt;
                // get the Alt-Zoom cursor position and orentation&lt;br /&gt;
                curPos = llList2Vector(rayData, 1);&lt;br /&gt;
                normal = llList2Vector(rayData, 2);&lt;br /&gt;
&lt;br /&gt;
                // calculate axis for point oirentation&lt;br /&gt;
                left = llVecNorm(normal % llRot2Fwd(camRot));&lt;br /&gt;
                fwd  = left % normal;&lt;br /&gt;
                &lt;br /&gt;
                curRot = llAxes2Rot(fwd, left, normal);&lt;br /&gt;
&lt;br /&gt;
                llOwnerSay(&amp;quot;Alt-Zoom Position: &amp;quot; + (string) curPos);&lt;br /&gt;
                llOwnerSay(&amp;quot;Point Rotation: &amp;quot;    + (string) curRot);&lt;br /&gt;
&lt;br /&gt;
                // rez an Object on a top of hit surface, 0.25 means the prim center offset from surface (0.5m cube)&lt;br /&gt;
                llRezObject(&amp;quot;Object&amp;quot;, curPos + &amp;lt;0.0, 0.0, 0.25&amp;gt; * curRot, ZERO_VECTOR, curRot, 0);&lt;br /&gt;
            }&lt;br /&gt;
            else&lt;br /&gt;
            {&lt;br /&gt;
                llOwnerSay(&amp;quot;Nothing hit, try again&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            llOwnerSay(&amp;quot;Attach me as a HUD first&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    on_rez(integer par)&lt;br /&gt;
    {&lt;br /&gt;
        llResetScript();&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:Teleworm Gelber|Teleworm Gelber]] 23:08, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Inaccurate (buggy) position and normal ==&lt;br /&gt;
&lt;br /&gt;
I don&#039;t really have time for this, ... but I tried it out with a quick script (see below)&lt;br /&gt;
and my conclusion is that the place that is reported for the hit is very inaccurate at times.&lt;br /&gt;
It certainly isn&#039;t equal to the physical (collision) shape of objects, for example the place&lt;br /&gt;
another physical object would lay, or where you&#039;d stand if you stood on top of a prim with&lt;br /&gt;
your avatar, and often it&#039;s just near random (actually, this is clearly a bug).&lt;br /&gt;
&lt;br /&gt;
The script that I used in my objects is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
vector center;&lt;br /&gt;
float distance = 15.0;&lt;br /&gt;
&lt;br /&gt;
rez_marker(vector pos, vector normal)&lt;br /&gt;
{&lt;br /&gt;
    llRezObject(&amp;quot;Marker&amp;quot;, pos, ZERO_VECTOR, llRotBetween(&amp;lt;0,0,1&amp;gt;, normal), 0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
probe(vector direction)&lt;br /&gt;
{&lt;br /&gt;
    //llSay(0, &amp;quot;direction = &amp;quot; + (string)direction);&lt;br /&gt;
    vector start = center + llVecNorm(direction) * distance;&lt;br /&gt;
    list results = llCastRay(start, center, RC_REJECT_AGENTS|RC_REJECT_PHYSICAL|RC_REJECT_LAND, RC_GET_NORMAL);&lt;br /&gt;
    if (llList2Integer(results, -1) &amp;gt; 0)&lt;br /&gt;
    {&lt;br /&gt;
        //llSay(0, &amp;quot;llCastRay returned &amp;quot; + (string)results);&lt;br /&gt;
        vector pos = llList2Vector(results, 1);&lt;br /&gt;
        vector normal = llList2Vector(results, 2);&lt;br /&gt;
        rez_marker(pos, normal);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;llCastRay FAILED!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    //rez_marker(start);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
init()&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        init();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    on_rez(integer param)&lt;br /&gt;
    {&lt;br /&gt;
        init();&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        if (llDetectedKey(0) != llGetOwner())&lt;br /&gt;
            return;&lt;br /&gt;
&lt;br /&gt;
        center = llGetPos();&lt;br /&gt;
        vector direction = &amp;lt;1,0,0&amp;gt;;&lt;br /&gt;
        float alpha;&lt;br /&gt;
        for (alpha = 0.0; alpha &amp;lt; 360.0; alpha += 10)&lt;br /&gt;
        {&lt;br /&gt;
            vector eul = &amp;lt;0, 0, alpha * DEG_TO_RAD&amp;gt;;&lt;br /&gt;
            rotation quad = llEuler2Rot(eul);&lt;br /&gt;
            probe(direction * quad);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put it in an object together with an object named &amp;quot;Marker&amp;quot;.&lt;br /&gt;
The Marker object should be a (red) sphere of size 0.1 x 0.1 x 0.01.&lt;br /&gt;
&lt;br /&gt;
The script will rez the Marker object on the surface of the&lt;br /&gt;
object you put it in, with it&#039;s flat side outwards.  If you test&lt;br /&gt;
this with a cube of 10x10x10 you&#039;ll understand what is the idea :p.&lt;br /&gt;
&lt;br /&gt;
Next test it with a Cylinder of size 3.4 x 4 x 3.342&lt;br /&gt;
Taper X and Y both 1.00, Top Shear X = 0.30, and Y = 0.0&lt;br /&gt;
(the rest default)... and see the deviations.&lt;br /&gt;
&lt;br /&gt;
Try many more funny shaped objects to see loads and loads of&lt;br /&gt;
bugs and inaccuracies.&lt;br /&gt;
&lt;br /&gt;
--[[User:Aleric Inglewood|Aleric Inglewood]] 0:55, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
You know, part of me hopes you&#039;re right--and that there&#039;s nothing I can do about it. Shapes like you&#039;re describing are terrible for the physics engine (tons of triangles, some of the degenerate, etc.). That said, I&#039;ll take a look at the physics debugger we have and see what&#039;s going on tomorrow. I suspect that the physics representation just isn&#039;t quite what you think it is. We&#039;ll see. Either way, thanks for bringing it to my attention.&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 03:41, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:As Teleworm points out below, the problem here is in your script, not in the llCastRay. You should check the hit list to find the hit with the UUID matching the scripted object&#039;s key and use that. You may still get more than one hit if you&#039;re near the edge of a triangle or if your shape is not convex, however.&lt;br /&gt;
:[[User:Falcon Linden|Falcon Linden]] 04:07, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Simple Raytracer==&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot_2983.png|left|256px]]&lt;br /&gt;
I did this a few days ago, it&#039;s pretty nifty!&lt;br /&gt;
&lt;br /&gt;
--[[User:Moy Loon|Moy Loon]]&lt;br /&gt;
&lt;br /&gt;
Not just nifty, bloody awesome! Btw, notice the way the two thin cylinders show as boxes. We replace long, thin cylinders with boxes. Can you take a photo with an avatar? :)&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 04:09, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[File:Avmeshforms.png|256px]]&lt;br /&gt;
&lt;br /&gt;
== Visualizing rays for debugging? ==&lt;br /&gt;
&lt;br /&gt;
Would it be possible to have the server send to the client the exact position of the begin and end points of the ray (so the client can render the ray itself) to help with debugging? (like trying to figure out ray positioning for a complex shaped linkset that needs close rays) I imagine it would be somthing like, the client tells the server it wants the rays, then the server will send the info for all rays owned by the avatar, and the client will render them as beacon like lines that fade gradually (the fading time would be a debug setting), perhaps add a bit of animation tot he beam like those pulses for the &amp;quot;cheesy beacon&amp;quot; for TP targets and tracking people on the map, to indicate the direction of the ray. To cope with packet loss, each time the client receives ray data it will tell the server whether to continue or stop, or perhaps just keep sending the request every N seconds and if the server don&#039;t get a request for a few N seconds it stops sending the info to that client. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 16:59, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I wish. Sorry, that&#039;s out of the scope of this project (which is intended to require a minimum amount of development time. So far, I think I&#039;ve spent &amp;lt;10hrs coding it, and I&#039;m trying to keep it under 20 total. &lt;br /&gt;
:[[User:Falcon Linden|Falcon Linden]] 04:20, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You could also just rez an object to &#039;visualize&#039; it, learn about llRotBetween, and how to split things up into 10m chunks! --moyloon&lt;br /&gt;
&lt;br /&gt;
== Edge of sim returning usefull results ==&lt;br /&gt;
&lt;br /&gt;
How about if when the ray hits the edge of the sim, position will be the intersection of the ray with the edge (since it can&#039;t go past it), and the UUID will be one constant if there is another sim on the other side of the edge, and another constant if it leads into the void? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 20:02, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Sorry, that&#039;s just a little too hacky and out of scope for this one. :) Would be interesting, though! Feel free to submit a jira for interrogating the region as to its neighboring sims. That might be a useful function.&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 04:11, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Phantom getting hit? ==&lt;br /&gt;
&lt;br /&gt;
Could anyone confirm if phantom objects are really not being ignored please? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 23:18, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Yes, this is a bug that I will fix when I have time. Shouldn&#039;t be too hard.&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 04:11, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Even flexies are getting hit, but the the normals seem to be messed up (in my preliminary tests it seems the normals returned for flexies all point up regardless of where you hit them) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:29, 8 July 2010 (UTC)&lt;br /&gt;
:: Flexies attached to phys linksets seem to be harder to hit (they also got a funky collision but just with the ground apparently, nothing but lucky rays and the ground seems to collide with them, i&#039;m not 100% sure, but i think in H4 not even the ground touches physical flexies) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:44, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Not hugely surprising, if phantom is getting picked up. Flexies don&#039;t have a flexible physics rep, I think it&#039;s just a box or something. I&#039;ll have to look into it, but probably not before next week. Curious, though, what about trees? (Note that a tree&#039;s physics shape is a very narrow box, so you&#039;d have to cast right in the middle of the tree.)&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 05:36, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Haha, whoops. I looked at my code and it&#039;s a one line bug. I could fix it now, but it&#039;s not critical and it wouldn&#039;t get updated on Aditi for a few days anyway. But rest assured, it should be a quick and easy one. :)&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 05:49, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Would it be possible to add a checkbox or a setting that scripts can set to keep flexies colliding with the ground when desired? I&#039;ve jsut made a random toy that it&#039;s kinda fun to watch that without flexies colliding with ground but nothing else wouldn&#039;t work quite the same (i&#039;m asking for a somthign liek a checkbox/hidden switch because i can imagine that if this behavior isn&#039;t present in H4 some stuff might break if it&#039;s kept). No biggie if it has to be fixed though. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 07:04, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:::This reminds me of one existing (Agni) edge case that might be useful to clear up with this.  Currently if an avatar sits on an object, and that object then sets VolumeDetect to TRUE, the physics engine sets the avatar to phantom, and it does not register any hits on the avatar, even to the point of rendering the avatar invulnerable with regards to LL Damage.  I had not thought to test this with RayCasting, but I am wondering what the intended effect will be in terms of how rays will interact with these phantom avatars.  For additional information, see [http://jira.secondlife.com/browse/SVC-1253 SVC-1253] which has sort of lingered in limbo, probably because there are more important things to fix.  However, if the raycasting code is still being written, it&#039;d be nice to prevent this sort of unintended behavior before it even begins.&lt;br /&gt;
:::[[User:Jahar Aabye|Jahar Aabye]] 03:27, 9 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:::The sitting-phantom glitch with llVolumeDetect already has some odd behaviors, if you enable physics on the linkset.  When physical, the avatars behave something like tiny points of solid material, snagging on objects that the linkset passes through.  It&#039;s very odd.  I suppose I should bring some example code around and shoot rays at it, an&#039; see what happens?&lt;br /&gt;
:::--[[User:Michelle Resistance|Michelle Resistance]] 16:19, 13 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Some good news for llCastRay ==&lt;br /&gt;
&lt;br /&gt;
I was playing with the script from Aleric Inglewood and tried to figure out what causes this strange inaccurate positions and normals. And I figured out that the main reason is the Marker size and shape and not the physic engine. &lt;br /&gt;
&lt;br /&gt;
In the example of Cylinder of size 3.4 x 4 x 3.342, the ray hits a Marker which was previously rezed one step before and not the surface of the cylinder. That is the reason, why were Normals wrong oriented. I modify the script in such a way that I numbered all Markers with llSetText.&lt;br /&gt;
&lt;br /&gt;
The second problem is inaccurate position. A marker is always placed about 3-5 cm &#039;&#039;&#039;above&#039;&#039;&#039; a surface, and not exactly on it on a flat surface. This can be seen on a cube object. On a sphere, this error is smaller. And in a shape of this deformed cylinder sometimes markers appears below surface and becomes invisible, but never more than 5cm.&lt;br /&gt;
&lt;br /&gt;
To correct the Aleric experiment, just make a smaller marker. And when all markers are rezed, resize the cylinder to become little smaller to see all markers. If you zoom with your camera very close, you can see that all markers follow the orientation of polygones that define the object shape.&lt;br /&gt;
&lt;br /&gt;
--[[User:Teleworm Gelber|Teleworm Gelber]] 23:40, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Good catch. I came to the same conclusion about Aleric&#039;s script, but I cheated (I have a way of visualizing the raycasts and the whole physics scene :). &lt;br /&gt;
&lt;br /&gt;
As for the inaccurate position, it&#039;s not inaccurate per se. It&#039;s just not what you expect. Most shapes in the physics engine (anything that isn&#039;t a perfect cylinder or perfect sphere, as I recall) has an additional radius of 5 or 10cm (I can never remember which). This is why if you stack physical boxes they&#039;ll have a gap between them. We use raycasts for sitting, but we specifically account for the radius in that code and in a few other places (like foot IK). There are a few other idiosyncracies around raycast results. For example, for most shape a ray parallel to its surface will not return a hit, nor will a ray terminating exactly at its surface or a ray originating inside the shape (unless it&#039;s a concave shape made of triangles, in which case the same holds true, but it&#039;s the individual triangle the ray begins inside that won&#039;t be hit). &lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 04:18, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Can we have this on the maingrid pretty please? ==&lt;br /&gt;
&lt;br /&gt;
I know this is experimental etc, but would it be possible to port the ray code to a sim version avaible on the maingrid and offer a sandbox sim with this hybrid version so we can play with ray with our main invs, live groups, chatting with friends inworld etc? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 00:19, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Sorry, no. We&#039;re not set up for doing that sort of thing. We can bring your agni inventory over to Aditi (contact Oskar), but you&#039;ll lose anything you currently have on Aditi.&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 04:21, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I know, the beta grid inventory is one way copy of the main grid inv, everything gets overwritten when it&#039;s refreshed; i would rather not have to keep exporting the stuff i make there when i want to keep them though. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 07:09, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Just saying TY ==&lt;br /&gt;
&lt;br /&gt;
TY ;-) Will be cool. Keep it up Falcon.&lt;br /&gt;
&lt;br /&gt;
== just letting you know ==&lt;br /&gt;
&lt;br /&gt;
I&#039;ll be out of town this week, won&#039;t be able to read the stuff here nor log in to test stuff, cya. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 20:57, 10 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Cast Ray vs. Ray Cast ==&lt;br /&gt;
&lt;br /&gt;
The function name proposed is &amp;quot;llCastRay&amp;quot; but the constants start &amp;quot;RC&amp;quot; as in &amp;quot;Ray Cast&amp;quot;. Would make sense to have them be consistent (as in &amp;quot;CR&amp;quot;). It&#039;s annoying keeping [[llMessageLinked]] and [[link_message]] straight. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 16:40, 15 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I second that motion. I&#039;m hoping this functionality is introduced and however it comes will be better than not coming at all but, while the opportunity exists to craft it to be as clean and user friendly as possible, that opportunity should be taken. Although this seems like a tiny issue (link_message vs llMessageLinked OR llSetLinkPrimitiveParamsFast *fingers gasp for breath* (although at least it wasn&#039;t llSetLinkPrimitiveParametersFast)) there is no good argument in favor of making function or event names insensible whereas there are good arguments in favor of them being simple and easy to write and remember. Now is the time to get that right. Still hugely in favor of the functionality though so if you MUST call it something complex and irritating, go right ahead ;-) -- &#039;&#039;&#039;[[User:Fred_Gandt|Fred Gandt]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Fred_Gandt|talk]]|[[Special:Contributions/Fred_Gandt|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 07:13, 17 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
The logic is that the method, llCastRay, is a verb phrase (&amp;quot;cast a ray&amp;quot;), whereas the parameters are noun/adjective phrases (&amp;quot;Ray Cast Reject Agents&amp;quot;, &amp;quot;Ray Cast Reject Terrain&amp;quot;). Does that make sense to you?&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 06:39, 19 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Hey Falcon :-)&lt;br /&gt;
&lt;br /&gt;
:Grammatically correct it may be but, fiddly. Muscle memory etc. llCastRay(CR_summit_summit) just flows better. It&#039;s really only the _summit_summit that matters at the end of the day. If there were flags that were &#039;&#039;BOTH&#039;&#039; RC_ &#039;&#039;AND&#039;&#039; CR_ (depending on grammatical doobrywotsits) then cool; but, if there will only be &#039;&#039;EITHER&#039;&#039; CR_ &#039;&#039;OR&#039;&#039; RC_ I for one would prefer to go along with the CR_ simply so I don&#039;t need to think about my old English teachers in the middle of writing a statement. *not terribly concerned but, interested* -- &#039;&#039;&#039;[[User:Fred_Gandt|Fred Gandt]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Fred_Gandt|talk]]|[[Special:Contributions/Fred_Gandt|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 10:35, 19 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I like the gramaticly correct approach, saves time when reading a script, and once you get used to it it flows as smoothly as anything else. It somtimes brings a smile to my face when i realise what i&#039;m writting makes sense even if i didn&#039;t understand what the words make happen under the hood. And the more consistent LSL is the better,  it already goes the gramaticly correct route elsewhere, so it would be expected it would also do it here. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 20:48, 19 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Tigro...An example of LSL being grammatically correct elsewhere would be, what? Perhaps the well known functions llGiveFolderOfInventoryListed or llSendMessageToLinkInSet?&lt;br /&gt;
::::Falcon (since I&#039;m already here)...I was thinking that since the world at large (when thinking about ray-casting) thinks of Ray-Casting rather than Casting-Rays it would prolly be even simpler to name the function llRayCast. *shrugs* TBH, whatever the parts end up being called it&#039;s how they work that matters most. Awesome of you to be trying to get this out. Hear&#039;s (now) quietly hoping. -- &#039;&#039;&#039;[[User:Fred_Gandt|Fred Gandt]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Fred_Gandt|talk]]|[[Special:Contributions/Fred_Gandt|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 04:02, 20 July 2010 (UTC)&lt;br /&gt;
::::: llMessageLinked isn&#039;t gramaticly correct?&lt;br /&gt;
&lt;br /&gt;
== ray_impact event vs. http ==&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been thinking about the asserted need for a ray_impact event to determine if you&#039;ve been hit by a raycast. Babbage suggested that instead of creating a new ray_impact event (which is trickier than any of us might like), the same goals could be accomplished using the existing HTTP url system. The idea was that you&#039;d set up a system as follows for securely communicating the results of the ray cast:&lt;br /&gt;
&lt;br /&gt;
1) Users wear a hit detection script that acquires an HTTP-in URL and stores it in its description. &lt;br /&gt;
2) For weapons builders, you provide a copy, no-mod (and thus unreadable) script (call it a &amp;quot;firing script&amp;quot;) that has a link_message event that the weapon builders&#039; scripts can use to talk to it. This script also contains a secret key known to the hit detection scripts.&lt;br /&gt;
3) The weapon script sends a link message to the firing script with the requested start/end position of the ray. The firing script (which is secure because it was written by the system creator) then casts a ray (if the start/end points are allowed based on game rules). If it detects a hit, it gets the target&#039;s hit detection url from the target&#039;s description and sends an HTTP POST with the details, including a secret code to verify authenticity.&lt;br /&gt;
&lt;br /&gt;
What would prevent this from being a viable alternative to a ray_impact event? (Obviously, it generalizes to other uses equally well.)&lt;br /&gt;
If you think it will be too slow or have another fault, could you code up a simple, testable example?&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
&lt;br /&gt;
:Something similar could be done using llRegionSay by sending the message on a frequently changing, random channel. The synchronization on channel would be performed by llRegionSay&#039;ing a new random channel number periodically, with the number encrypted using a key shared by all interested/authorized scripts. This would seem a lot simpler/faster than the HTTP idea.&lt;br /&gt;
&lt;br /&gt;
::I think a ray_impact would be a useful event, but by no means necessary.  There&#039;s any number of ways to securely communicate script to script using chat, http, reading one another&#039;s descriptions, carrier pigeon, etc., with llSHA1String or llMD5String and a password providing authentication.  If ray_impact is any trouble, drop the idea; don&#039;t let it stand in the way of getting us llCastRay.  It would be simpler to update existing combat meters using a new event, I think, but I don&#039;t think that should be a barrier.  [[User:Jack Abraham|Jack Abraham]] 07:23, 22 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Change Reject constants to be inclusive ==&lt;br /&gt;
Many, if not all other, LL calls use constants OR&#039;d together in a positive sense to change a scripts&#039; behavior.&lt;br /&gt;
This is the only function where I have seen constants used to reduce what the function does.&lt;br /&gt;
&lt;br /&gt;
I&#039;d suggest changing the RC_REJECT constants by eliminating the _REJECT_ portion and also adding a new constant, something along the lines of RC_ALL.&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;normal&amp;quot; call would have the ALL constant unless you only wanted a subset of actions, in which case your OR together the constants you need.&lt;br /&gt;
&lt;br /&gt;
What do people think?  [[User:Jonathan Yap|Jonathan Yap]] 10:01am, 24 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Although unusual (this is just my opinion) rejection rather than inclusion seems like a perfectly reasonable way around things. I wonder if it might be more efficient too. Analogy: Compact discs: When a CD has bonus tracks that are often disruptive when listening to an otherwise complete listening experience, it is typical to avoid being disturbed after the album is finished that we need to &#039;&#039;include&#039;&#039; all the album tracks in a programmed playlist before starting the playback. I have often wished that I could &#039;&#039;exclude&#039;&#039; the few bonus tracks instead. I would go so far as suggesting that bonus tracks should be (in what seems an illogical fashion) the first tracks indexed on the CD so that no playlist programming is required at all; We simply start playback at track 4 to avoid playing the 3 bonus tracks. So although unusual and unexpected, an alternative way might be more efficient and simpler to use.&lt;br /&gt;
::This however is not a compact disc so, my greatest concern is with how well it works and how efficient it is as code. If there is NO difference in efficiency at all between rejection and inclusion, for the sake of continuity I would certainly agree with [[User:Jonathan Yap|Jonathan]] insofar that the &#039;&#039;normal&#039;&#039; way to construct a function by &#039;&#039;inclusive&#039;&#039; constants would be preferable. -- &#039;&#039;&#039;[[User:Fred_Gandt|Fred Gandt]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Fred_Gandt|talk]]|[[Special:Contributions/Fred_Gandt|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 08:26, 25 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Optimizing Simulations ==&lt;br /&gt;
&lt;br /&gt;
Well, I got quite a few ideas that surround this issue, and I have tried to narrow it doesn&#039;t to a simple concept that describes a pattern how to use functionality, like llCastRay(), to optimization simulations. I blogged more details here: [http://icyspherical.blogspot.com/2010/07/optimizing-simulations-with-basic.html Icesphere Blog]. Let&#039;s not confuse this with a common ray-tracer. I want the client end to contact a prim on the simulator to demonstrate the basic pattern. The prim just needs to cast rays and send data back to the client. The client-side fills in the details. This first phase would only need to get a rough scene layout. Close objects probably can be gathered with a scanner and some further objects can be done with llCastRay() (can&#039;t cross sims yet, but someday maybe). Hopefully, use http client/server methods to communicate with detected objects.&lt;br /&gt;
&lt;br /&gt;
Now with that basics above, scripts added into detected objects could further describe details of the scene through client/server methods. I&#039;ve seen other LSL raytracers, that didn&#039;t use llCastRay(), that used scripts to store &amp;quot;material&amp;quot; data and thought... cool!&lt;br /&gt;
&lt;br /&gt;
Posted some vulgar code here: [[User:Dzonatas_Sol/HttpCastRayLLSD]] [[User:Dzonatas Sol|Dzonatas Sol]] 05:52, 28 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Possibility of a &amp;quot;Fast&amp;quot; trace ==&lt;br /&gt;
&lt;br /&gt;
Hi Falcon.&lt;br /&gt;
&lt;br /&gt;
ty ty ty ty ty ty :D (Now that I got that off my chest :p)&lt;br /&gt;
&lt;br /&gt;
I&#039;ve got a bit of a suggestion, is it possible to add a llCastRayFast which only determines if there is something within the filter that&#039;s in the way between point A and point B.&lt;br /&gt;
&lt;br /&gt;
E.g. xyz avatar wants to go to sleep but a requirement to goto sleep in a hud is that the avatar is sheltered from the elements, the script does a trace looking to see if the avatar has a clear shot at the sky or not, if not the avatar is under cover.&lt;br /&gt;
&lt;br /&gt;
I really hope the hands of god (LL) allow this to make it into the maingrid.&lt;br /&gt;
&lt;br /&gt;
Look forward to catching you on the test grid :)&lt;br /&gt;
&lt;br /&gt;
Cheers,&lt;br /&gt;
Lastro&lt;br /&gt;
&lt;br /&gt;
edit: Also see my user page for some code I&#039;ve done, which works how I would expect it to (appart from it detecting the target object)&lt;br /&gt;
&lt;br /&gt;
Another idea would be the ability to do a ray trace between two object/agent/etc UUIDs. --[[User:Lastro Greenwood|Lastro Greenwood]] 00:54, 7 August 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Lastro Greenwood</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Lastro_Greenwood&amp;diff=995672</id>
		<title>User:Lastro Greenwood</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Lastro_Greenwood&amp;diff=995672"/>
		<updated>2010-08-07T00:38:44Z</updated>

		<summary type="html">&lt;p&gt;Lastro Greenwood: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Lastro Greenwood&#039;s Page ==&lt;br /&gt;
Hey everyone, I&#039;m Lastro Greenwood.&lt;br /&gt;
&lt;br /&gt;
I specialise in software development but can kinda build.&lt;br /&gt;
&lt;br /&gt;
== Scratch Pad ==&lt;br /&gt;
=== llCastRay ===&lt;br /&gt;
Determines if something is blocking line of sight to avatar.&lt;br /&gt;
&lt;br /&gt;
Uses:&lt;br /&gt;
* Radiation?&lt;br /&gt;
* Checking to see if avatar is hiding behind cover&lt;br /&gt;
* Checking to see if avatar has line of sight to a heat source&lt;br /&gt;
* Other stuff that requires LOS&lt;br /&gt;
&lt;br /&gt;
Observations:&lt;br /&gt;
* When running the trace it seems to go straight through all objects that get in its way&lt;br /&gt;
* It will return false if you dont filter out the object, a quick fix would be to change &amp;quot;if(numobj == 0)&amp;quot; to &amp;quot;if(numobj == 1)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer getnumobj(list traceres)&lt;br /&gt;
{&lt;br /&gt;
    return (integer)llList2String(traceres,llGetListLength(traceres)-1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
integer isVisible(vector start, vector finish, integer filter)&lt;br /&gt;
{&lt;br /&gt;
    list res = llCastRay(start,finish,filter,0);&lt;br /&gt;
    integer numobj = getnumobj(res);&lt;br /&gt;
    &lt;br /&gt;
    if(numobj == 0)&lt;br /&gt;
        return TRUE;&lt;br /&gt;
    &lt;br /&gt;
    return FALSE;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        vector pos = llGetPos();&lt;br /&gt;
        vector finalpos = llDetectedPos(0);&lt;br /&gt;
        if(isVisible(pos,finalpos,AGENT) == TRUE)&lt;br /&gt;
            llOwnerSay(&amp;quot;I can see clearly now!&amp;quot;);&lt;br /&gt;
        else&lt;br /&gt;
            llOwnerSay(&amp;quot;Something is in my way!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lastro Greenwood</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Lastro_Greenwood&amp;diff=995662</id>
		<title>User:Lastro Greenwood</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Lastro_Greenwood&amp;diff=995662"/>
		<updated>2010-08-07T00:35:43Z</updated>

		<summary type="html">&lt;p&gt;Lastro Greenwood: /* Scratch Pad */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Lastro Greenwood&#039;s Page ==&lt;br /&gt;
Hey everyone, I&#039;m Lastro Greenwood.&lt;br /&gt;
&lt;br /&gt;
I specialise in software development but can kinda build.&lt;br /&gt;
&lt;br /&gt;
== Scratch Pad ==&lt;br /&gt;
=== llCastRay ===&lt;br /&gt;
Determines if something is blocking line of sight to avatar.&lt;br /&gt;
&lt;br /&gt;
Uses:&lt;br /&gt;
* Radiation?&lt;br /&gt;
* Checking to see if avatar is hiding behind cover&lt;br /&gt;
* Checking to see if avatar has line of sight to a heat source&lt;br /&gt;
* Other stuff that requires LOS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer getnumobj(list traceres)&lt;br /&gt;
{&lt;br /&gt;
    return (integer)llList2String(traceres,llGetListLength(traceres)-1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
integer isVisible(vector start, vector finish, integer filter)&lt;br /&gt;
{&lt;br /&gt;
    list res = llCastRay(start,finish,filter,0);&lt;br /&gt;
    integer numobj = getnumobj(res);&lt;br /&gt;
    &lt;br /&gt;
    if(numobj == 0)&lt;br /&gt;
        return TRUE;&lt;br /&gt;
    &lt;br /&gt;
    return FALSE;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        vector pos = llGetPos();&lt;br /&gt;
        vector finalpos = llDetectedPos(0);&lt;br /&gt;
        if(isVisible(pos,finalpos,AGENT) == TRUE)&lt;br /&gt;
            llOwnerSay(&amp;quot;I can see clearly now!&amp;quot;);&lt;br /&gt;
        else&lt;br /&gt;
            llOwnerSay(&amp;quot;Something is in my way!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lastro Greenwood</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Lastro_Greenwood&amp;diff=995652</id>
		<title>User:Lastro Greenwood</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Lastro_Greenwood&amp;diff=995652"/>
		<updated>2010-08-07T00:31:01Z</updated>

		<summary type="html">&lt;p&gt;Lastro Greenwood: /* Lastro Greenwood&amp;#039;s Page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Lastro Greenwood&#039;s Page ==&lt;br /&gt;
Hey everyone, I&#039;m Lastro Greenwood.&lt;br /&gt;
&lt;br /&gt;
I specialise in software development but can kinda build.&lt;br /&gt;
&lt;br /&gt;
== Scratch Pad ==&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer getnumobj(list traceres)&lt;br /&gt;
{&lt;br /&gt;
    return (integer)llList2String(traceres,llGetListLength(traceres)-1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
integer isVisible(vector start, vector finish)&lt;br /&gt;
{&lt;br /&gt;
    list res = llCastRay(start,finish,0,0);&lt;br /&gt;
    integer numobj = getnumobj(res);&lt;br /&gt;
    &lt;br /&gt;
    if(numobj == 0)&lt;br /&gt;
        return TRUE;&lt;br /&gt;
    &lt;br /&gt;
    return FALSE;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        vector pos = llGetPos();&lt;br /&gt;
        vector finalpos = llDetectedPos(0);&lt;br /&gt;
        if(isVisible(pos,finalpos) == TRUE)&lt;br /&gt;
            llOwnerSay(&amp;quot;I can see clearly now!&amp;quot;);&lt;br /&gt;
        else&lt;br /&gt;
            llOwnerSay(&amp;quot;Something is in my way!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lastro Greenwood</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlCastRay&amp;diff=995522</id>
		<title>Talk:LlCastRay</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlCastRay&amp;diff=995522"/>
		<updated>2010-08-06T04:52:24Z</updated>

		<summary type="html">&lt;p&gt;Lastro Greenwood: /* Possibility of a &amp;quot;Fast&amp;quot; trace */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Why isn&#039;t this using the sensor API? ==&lt;br /&gt;
&lt;br /&gt;
# The sensor API already exists and has well understood behavior.&lt;br /&gt;
# The sensor API resolves many of the problems people have brought up, such as list length and range.&lt;br /&gt;
# The sensor API is asynchronous.&lt;br /&gt;
# Creating new APIs when there are already viable existing ones leads to Mainframe-itis.&lt;br /&gt;
# This would be an opportunity to add a result filter variant to the llSensor() family...&lt;br /&gt;
&lt;br /&gt;
llCastRay(string name, key id, integer type, float range, vector path, integer request_mask);&lt;br /&gt;
&lt;br /&gt;
Eg:&lt;br /&gt;
&lt;br /&gt;
 llCastRay(&amp;quot;&amp;quot;, &amp;quot;&amp;quot;, AGENT|ACTIVE|PASSIVE, 32, &amp;lt;1, 0, 0&amp;gt;, SENSOR_POSITION);&lt;br /&gt;
  &lt;br /&gt;
 /...&lt;br /&gt;
 &lt;br /&gt;
 sensor(integer n)&lt;br /&gt;
 {&lt;br /&gt;
   integer i;&lt;br /&gt;
   for(i = 0; i &amp;lt; n; i++)&lt;br /&gt;
     llSay(0, &amp;quot;Ping at &amp;quot;+(string)llDetectedPos(i));&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
-- [[User:Argent Stonecutter|Argent Stonecutter]] 11:53, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I think somewhere Falcon said not doing it like sensors was intentional in order to get the data the moment the command is run instead of having to wait for an event, i don&#039;t remember seeing an explanation why this was a better approach though.&lt;br /&gt;
:Btw, how would the normal of the hit(s) be reported? A new llDetected* function? Perhaps this would be an opportunity to introduce list llDetected(integer index, list what), this way future llDetected* functions can be easily prototyped without needing to actually implement a whole new command in the server (you know, like with the primitive params stuff)&lt;br /&gt;
:ps: talking about normals and llDetected* i would like to plug [http://jira.secondlife.com/browse/SVC-3369 SVC-3369] &amp;quot;llDetectedCollisions* (similar to llDetectedTouch*)&amp;quot; , mind taking a look Falcon?&lt;br /&gt;
--[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 12:46, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:This was not done like the sensor API because it&#039;s not really all that similar to sensors. Unfortunately I don&#039;t have time to get into a discussion of why the API you&#039;re suggesting would be problematic, but if you read the history of this feature (SVC-5389), I hope you&#039;ll begin to see where I&#039;m coming from.&lt;br /&gt;
:Tigro, Sorry, I&#039;m backlogged for a month at this point, so I don&#039;t think I&#039;ll be able to look at that soon. :) In general, I&#039;m looking at this feature right now only because it affects a huge audience and is way, way overdue. Oh, and because I&#039;m a physics guy and it&#039;s a physics feature more than anything else. :P&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 03:34, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::SVC-5389 is about download problems. Do you mean SVC-5381? There&#039;s a couple of notes about sensors being &amp;quot;heavy&amp;quot;, but not really any explanation of why they&#039;re &amp;quot;heavy&amp;quot;. The only heavy feature of sensors is that it calculates and returns more information than you&#039;re asking for, and the request_mask would take care of that... and would open up the possibility of adding the same kind of masking to existing sensor calls. In terms of scripting, sensors are in many ways lighter because you&#039;re not having to pass around (and copy) lists.&lt;br /&gt;
&lt;br /&gt;
:: There&#039;s some comments about speed of response, but also about having to throttle it to once per frame. I think the sensor API would make that less of an issue.  -- [[User:Argent Stonecutter|Argent Stonecutter]] 20:09, 11 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== llSonar please? ==&lt;br /&gt;
&lt;br /&gt;
I would appreciate if you took in consideration my suggestions at http://jira.secondlife.com/browse/SVC-2486 please; any feedback is more than welcome. &lt;br /&gt;
&lt;br /&gt;
ps:llCastRay is already awesome, you rock! Please try the hardest you can to figure out how to get this to come to the maingrid with the least crippling as possible.&lt;br /&gt;
&lt;br /&gt;
--[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 03:01, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hi Tigro,&lt;br /&gt;
&lt;br /&gt;
If I understand your feature request, it sounds much like the shape cast described in SVC-5381 (http://jira.secondlife.com/browse/SVC-5381) for a sphere or a cylinder cast along its primary axis. Is that correct?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]]&lt;br /&gt;
&lt;br /&gt;
: I have just skimmed thru the comments there, do shape casting allow for somthing liek for example have a nonphys object recognize the geometry so it could rest against a jumbled pile of prims as if it was laying against them physicly? (in the ASCII art in SVC-2486 it would be having the object represented by the O&#039;s resting in the diagonal line as if it was solid) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:44, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:A practical example, imagine a giant mecha, with big flat feet, now imagine a landscape littered with prims of all sorts of shapes and sizes, to make it look realistic, on each step the foot should be rotated to rest against the highest points under it ; just raycasting you have the risk of shooting between prims, and with shapecast you don&#039;t get the rotation for the foot. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 03:04, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== What am I looking at? ==&lt;br /&gt;
&lt;br /&gt;
A function I just threw in to replace phantom bullets for quickly acquiring a point of interest -- whatever your camera&#039;s focused on (in this sim, within 20m) is returned, allowing quicker, more intuitive targeting of other objects.  PERMISSION_TRACK_CAMERA must be previously set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;key camPing() {&lt;br /&gt;
    // End points at the camera and 20m in front of it&lt;br /&gt;
    vector camPos = llGetCameraPos();&lt;br /&gt;
 &lt;br /&gt;
    // Clamp the end position to within the sim&lt;br /&gt;
    // From an SLUniverse post by Chalice Yao&lt;br /&gt;
    // http://www.sluniverse.com/php/vb/scripting/46344-llcastray-available-testing-maybe-only.html#post969497&lt;br /&gt;
    float xSteps;&lt;br /&gt;
    float ySteps;&lt;br /&gt;
    vector camRot = llRot2Fwd(llGetCameraRot());&lt;br /&gt;
    fXSteps = llAbs( ( 256.0 * !!camRot.x ) - camPos.x ) / camRot.x;&lt;br /&gt;
    fYSteps = llAbs( ( 256.0 * !!camRot.y ) - camPos.y ) / camRot.y;&lt;br /&gt;
    if(xSteps &amp;gt; ySteps)&lt;br /&gt;
        xSteps = ySteps;&lt;br /&gt;
    if ( xSteps &amp;gt; 20.0 )&lt;br /&gt;
        xSteps = 20.0&lt;br /&gt;
&lt;br /&gt;
    // Cast the ray; ignore hits on land, otherwise get the root key&lt;br /&gt;
    list contacts = llCastRay( camPos, camPos + ( camRot * xSteps ), &lt;br /&gt;
        RC_REJECT_LAND,&lt;br /&gt;
        RC_GET_ROOT_KEY );&lt;br /&gt;
&lt;br /&gt;
    // Return values&lt;br /&gt;
    if ( llList2Integer( contacts, -1 ) &amp;gt; 0 ) { // Got a return&lt;br /&gt;
        return llList2Key( contacts, 0 );&lt;br /&gt;
    }&lt;br /&gt;
    return NULL_KEY;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[User:Jack Abraham|Jack Abraham]] 06:10, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== RC_GET_LINK_NUM?  Not RC_GET_LINK_KEY? ==&lt;br /&gt;
&lt;br /&gt;
I can&#039;t think of a circumstance where knowing the link number of the return would be useful.  UUID of the prim hit would be far more useful; is that within the realm of possibility? [[User:Jack Abraham|Jack Abraham]] 04:47, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hi Jack,&lt;br /&gt;
&lt;br /&gt;
The default behavior is to return the UUID of the prim hit. If you want the root key instead, you have to use RC_GET_ROOT_KEY. The intended purpose of RC_GET_LINK_NUM was for scripts like your camera targeting system where it is expected that the camera will be pointed at a child of the linkset performing the cast. For example, suppose you make a minesweeper game where each tile is a prim in the linkset. And suppose you script it so that the use can select a tile by focusing on it and clicking. The script could cast a ray from the camera and determine the link number of the tile in the player&#039;s line of sight. Then it could use that link number in an llMessageLinked or some other LSL function to modify the appropriate child prim. Does that make sense? If it turns out no one has any use for RC_GET_LINK_NUM, I&#039;ll eliminate it for the sake of simplicity. But the behavior you&#039;re looking for is already there by default! Yay.&lt;br /&gt;
&lt;br /&gt;
Cheers,&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]]&lt;br /&gt;
&lt;br /&gt;
Makes perfect sense; I need to read better.  Thanks.  [[User:Jack Abraham|Jack Abraham]] 05:44, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Memory concerns ==&lt;br /&gt;
&lt;br /&gt;
Dumping all possible avaible information into a list regardless of whether any of them will be used seems severely wasteful. If you really need to dump all the info as soon as the command is called straight into script memory, at least do somthing like adding a parameter to the command that is a list where each item identifies which pieces of information the scripter wants (like  with llGetPrimtiveParams ) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:51, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I think we basically have that, Tigro; we only get UUID and hit position unless we set additional flags.  Falcon indicated that we will not get all hits in the final version; that&#039;ll further reduce the size of the list. [[User:Jack Abraham|Jack Abraham]] 07:50, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Clamping ==&lt;br /&gt;
&lt;br /&gt;
It would be a waste of server resources if every script has to add clamping code to make sure&lt;br /&gt;
their begin and end are inside the region! Instead, do not return an error code but just stop&lt;br /&gt;
and return only the hits inside the region. That might mean you have to add the clamping code in the&lt;br /&gt;
server, but that would be a hell of a lot more efficient than doing that in the LSL scripts.&lt;br /&gt;
&lt;br /&gt;
Note that clamping is relatively easy, in C++ it shouldn&#039;t cost more than a few microseconds.&lt;br /&gt;
The algorithm would be something like:&lt;br /&gt;
&lt;br /&gt;
1) A bounding box can be given with two vectors: &#039;&#039;bbmin&#039;&#039; and &#039;&#039;bbmax&#039;&#039;, where &#039;&#039;bbmin&#039;&#039; is the bottom,&lt;br /&gt;
south/west corner of the sim (0,0,0), and &#039;&#039;bbmax&#039;&#039; the upper, north/east corner of the sim&lt;br /&gt;
(256,256,4096).&lt;br /&gt;
&lt;br /&gt;
2) Let the ray begin at vector &#039;&#039;begin&#039;&#039; and end at vector &#039;&#039;end&#039;&#039; (using the same coordinate system as the bounding box).&lt;br /&gt;
&lt;br /&gt;
3) Calculate bbmine = bbmin - end, and bbmaxe = bbmax - end. Check if end is outside the sim,&lt;br /&gt;
so clamping is needed at all, by checking that at least one coordinate in bbmine is positive&lt;br /&gt;
or one coordinate in bbmaxe is negative (set &#039;clamping_needed&#039;).&lt;br /&gt;
&lt;br /&gt;
4) Shift coordinates so that &#039;&#039;begin&#039;&#039; becomes the origin and &#039;&#039;end&#039;&#039; becomes the direction&lt;br /&gt;
(bbmin -= begin; bbmax -= begin; dir = end - begin). Lets call &#039;&#039;end&#039;&#039; &#039;&#039;dir&#039;&#039; from now on.&lt;br /&gt;
&lt;br /&gt;
5) Check that bbmin has three negative coordinates and &#039;&#039;bbmax&#039;&#039; has three positive coordinates.&lt;br /&gt;
If not then &#039;&#039;begin&#039;&#039; is outside the bounding box (if the signs are correct, except there are one or more zeroes, it&#039;s on the border&lt;br /&gt;
and you can just return &#039;&#039;begin&#039;&#039;). Not sure if you should return an error code or return just no results.&lt;br /&gt;
Finally, if begin is outside the bounding box, but end was inside, you might want to clamp begin&lt;br /&gt;
instead of end. Lets assume that begin is inside the bounding box for now. If end was also inside&lt;br /&gt;
it, then no clamping is needed and we stop here.&lt;br /&gt;
&lt;br /&gt;
6) Clamping is needed. Calculate dir.x / bbmin.x, dir.x / bbmax.x, dir.y / bbmin.y, dir.y / bbmax.y, dir.z / bbmin.z and dir.z / bbmax.z.&lt;br /&gt;
&lt;br /&gt;
7) Find the largest value &#039;max&#039; of those six and return &#039;&#039;begin&#039;&#039; + dir / max as the collision point of the ray in the direction dir.&lt;br /&gt;
&lt;br /&gt;
As you can see, this is a very fast routine. Still, I think it should be added to the server side.&lt;br /&gt;
I didn&#039;t add code in order to avoid any license problems ;)&lt;br /&gt;
&lt;br /&gt;
[[User:Aleric Inglewood|Aleric Inglewood]] 12:00, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Actually, using SSE2, clamping would take just a few cpu instructions. It&#039;s not a question of efficiency for me, it&#039;s a question of future compatibility. Since we don&#039;t have script versioning for LSL, if we later add the ability to cast rays between sims or change the size of a region, existing scripts will break. I&#039;ve been thinking of adding a version parameter to this function in order to deal with that possibility, in which case I could clamp in native code.&lt;br /&gt;
&lt;br /&gt;
Cheers&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 17:20, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:Definitely, clamping in native code rather than LSL is very desirable.  I&#039;m thinking a version parameter would be best done as a way of accessing old behaviors, similarly to how we have legacy prim types in llSetPrimitiveParams, and optional for the latest version.  What do y&#039;allz think?&lt;br /&gt;
::--[[User:Michelle Resistance|Michelle Resistance]] 15:37, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== return also types casted ==&lt;br /&gt;
&lt;br /&gt;
since filters RC_REJECT_AGENTS, RC_REJECT_PHYSICAL, RC_REJECT_NONPHYSICAL, and RC_REJECT_LAND are used, and therefore detected, it would be handy if in the results returned, the status AGENT, NON_PHYSICAL, PHYSICAL and LAND  would also be returned. Is it douable ?&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been thinking about that. Either I&#039;ll somehow include the type in the list of returned data (perhaps only if you add the flag RC_GET_TYPE or something) or else modify llGetObjectDetails to return the data. You&#039;ll definitely have access one way or the other. Regarding land, though, you can definitively identify that because it will return null UUID.&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 17:20, 3 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Meep ==&lt;br /&gt;
&lt;br /&gt;
Heya Falcon, really would absolutely love to have an llCastRay function in production.&lt;br /&gt;
&lt;br /&gt;
I saw you had a concern of versioning issues. To overcome that, I heavily recommend using a list as an input, as that would be far more flexible on the kind of parameters and options you can push through rather than fooling yourself into using a hardcoded structure of llCastRay(vector start, vector end, other stuff) etc. A bit like how llSetPrimitiveParams works basically. For example in the past, LL upgraded the prim type interface from legacy to a more advanced and flexible set of input (torii, tubes and rings, yey), they could do this easily because a list was used as a parameter in the function, instead of having to expend resources on adding more functions, bloating LSL and causing legacy issues.&lt;br /&gt;
&lt;br /&gt;
I also have a question, when you cast a ray and it hits an avatar, that hits the avatars&#039; actual sphere-ish phys mesh, correct?&lt;br /&gt;
&lt;br /&gt;
I have actually experimented personally with LSL and my custom client with a prototype LSL Script API, I could offload raycast processing into nearby clients easily and even built a half-working hexapod spider that can walk on a prim landscape, as well as all the fun raycasting combat gun stuff :). So, I have some serious experience to share in this field and having the raycasts locally processed would be really useful in a more timely manner (rather than suffering the delays of network lag).&lt;br /&gt;
&lt;br /&gt;
What are your thoughts on the kind of filtering? Whitelist versus Blacklist? Whitelists are apparently more effective based on desire. (Would be good for consistency (which is hard enough to come by..): llSensors, llListen, ...)&lt;br /&gt;
&lt;br /&gt;
On a last note, you might be wondering about my achievement with my custom client, I couldn&#039;t get raycasting weapons taking off because there is a missing critical element to gameplay: Tracers. The user of a gun MUST be able to see WHERE their bullets went (guns use fire cone spread algorithms for added realism). This is one of the significant problems that keep raycasting usage in weaponry really taking off. Otherwise I could have seriously introduced raycasting and changed the face of SL combat with my custom client. If only particle systems could be spontaneously created midair (without requiring the particle system to be &#039;attached&#039; to the prim (it&#039;s possible code-wise in the client btw)) via scripts to simulate tracer effects, then raycasting would seriously be able to take off socially.&lt;br /&gt;
&lt;br /&gt;
--[[User:Nexii Malthus|&amp;lt;span style=&amp;quot;color: #bbb; text-shadow:-1px -1px #ddd, 1px 1px #888;&amp;quot;&amp;gt;Nexii Malthus&amp;lt;/span&amp;gt;]] 02:10, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hi Nexii,&lt;br /&gt;
&lt;br /&gt;
Let me take these one at a time. First, in regard to versioning, LSL lists are very inefficient on the C++ side. They&#039;re implemented as linked lists (yuck). I do see the advantage to using a list for parameters, but it would make parsing it slower and I&#039;d rather pull a Windows API (heh, also yuck) style move and (a) add a reserved version number parameter and (b) if necessary later, create an llCastRayEx function. Not the world&#039;s most extensible implementation, but c&#039;est la vie.&lt;br /&gt;
&lt;br /&gt;
Second, an avatar&#039;s shape isn&#039;t sphere shaped at all...and it&#039;s not a mesh, it&#039;s a convex hull. Its basic shape is kind of like a capsule. I&#039;ll leave the process of determining its exact shape via llCastRay calls with RC_GET_NORMAL as an exercise to the reader. :) (And if you do it, be sure to post pictures! That would rock.)&lt;br /&gt;
&lt;br /&gt;
Third, I&#039;m pushing hard for LL to provide client side prediction/client side physics. Although that wouldn&#039;t immediately lead to client side scripting, it eventually might. And in the meantime, although open source viewers would need to replace the physics module with an open source version (of which there are plenty), you would have a framework for doing physics-based raycasts locally.&lt;br /&gt;
&lt;br /&gt;
Fourth, regarding filtering, it just made the most sense to use blacklists as it&#039;s most common to want to know &amp;quot;What&#039;s the first thing I&#039;m hitting?&amp;quot; It&#039;s less common to want to know &amp;quot;what&#039;s the first avatar/prim/land triangle that I&#039;m hitting?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Finally, after seeing your comment about tracers I looked up the details of llParticleSystem and was astonished to see that, as far as I could tell, you&#039;re totally right. Here&#039;s one idea as a temporary workaround: rez a transparent, phantom, nonphysical sphere (perfect, solid spheres are the simplest physics shape available) at the location you need your particle effect, create it there, and then call llDie(). It sucks, I know, but I&#039;m not a graphics programmer and can&#039;t add an appropriate particle system function. Another idea, though much much less efficient, would be to rez a set of long, colored, phantom cylinders the length of the raycast. It&#039;s still much more efficient than prim bullets since it would be nonphysical and phantom, though.&lt;br /&gt;
&lt;br /&gt;
Hope that helps,&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 05:44, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Avmeshforms.png|256px]]&lt;br /&gt;
Rendering of what the standing and ground sitting av shapes are!&lt;br /&gt;
--[[User:Moy Loon|Moy Loon]]&lt;br /&gt;
: Hahahahah, awesome! :D&lt;br /&gt;
: btw, can you repeat this but with a crouching av as well to confirm there is no change when an av crouches please? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 18:35, 24 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I already know that crouching avs have no change, The sitting on a prim is different than the ground sit though!&lt;br /&gt;
--Moy&lt;br /&gt;
&lt;br /&gt;
== Function to not fail, what do you think? ==&lt;br /&gt;
&lt;br /&gt;
I made this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;list JustRayIt(vector start, vector end, integer filter, integer flags)&lt;br /&gt;
{&lt;br /&gt;
    list temp;&lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
    while((llList2Integer(temp, -1) &amp;lt; 0) || (llGetListLength(temp) == 0))&lt;br /&gt;
    {&lt;br /&gt;
        temp = llCastRay(start, end, filter, flags);&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    return temp;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The idea being to halt the rest of the script until it can get a valid trace; does it work the way i intended it to? Is there any downside to using this? Is there a better way to get the same result? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 04:14, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hi Tigro,&lt;br /&gt;
&lt;br /&gt;
The script you&#039;re suggesting would, sadly, be hugely inefficient. It would hog system resources until the script&#039;s time slice ran out. And, to make matters worse, once you fail you&#039;re guaranteed not succeed until at least the next frame anyway. I&#039;m not a huge lsl scripter, so I&#039;m not 100% sure, but I believe if you added an llSleep(0) call in the while loop, your script would be put to sleep until the next frame. Failing that, try llSleep(0.1) or some other small number.&lt;br /&gt;
&lt;br /&gt;
Good luck,&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 05:29, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:The way it is on the Oatmeals, do tracing ever fail in the frame? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:40, 4 July 2010 (UTC)&lt;br /&gt;
:Also, doesn&#039;t llSleep hog systems resources just the same? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:44, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
On Oatmeal, casts will fail if the overall physics FPS drops too low. It will never fail due to too many raycasts in the same frame, however. In production it will, but I wanted to see how people used it before determining appropriate limits.&lt;br /&gt;
&lt;br /&gt;
llSleep stops execution of your script and allows the simulator to move on to processing another script. It is not implemented as a busy-wait. (At least, I sure hope not. I haven&#039;t actually checked the code.)&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 05:50, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
: How about this version?&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
list JustRayIt(vector start, vector end, integer filter, integer flags)&lt;br /&gt;
{&lt;br /&gt;
    list temp;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    while((llList2Integer(temp, -1) &amp;lt; 0) || (llGetListLength(temp) == 0))&lt;br /&gt;
    {&lt;br /&gt;
        llSleep(0);&lt;br /&gt;
        temp = llCastRay(start, end, filter, flags);&lt;br /&gt;
 &lt;br /&gt;
    }&lt;br /&gt;
    if(llGetListLength(temp) == 1)&lt;br /&gt;
    temp = [NULL_KEY,end, llVecNorm(end-start), 0];&lt;br /&gt;
 &lt;br /&gt;
    return temp;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
: It got the sleep as you suggested, and if it doesn&#039;t hit anything in range it still returns a key, a hit position, a normal (so it kinda works like a telescopic feeler, when not reaching anythign it eventually stops at maximum extension with no deflection), while still keeping llList2Integer(theraylist, -1) == 0&lt;br /&gt;
--[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 19:43, 7 July 2010 (UTC)&lt;br /&gt;
:Ok, i finally managed to get it to wrok right, i think, but hsould i keep posting here clogging the talk page?&lt;br /&gt;
&lt;br /&gt;
== Partially offtopic: about SVC-4606 &amp;quot;Surface conveyour belt&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Falcon, if it&#039;s not you, could you please bring [http://jira.secondlife.com/browse/SVC-4606 SVC-4606] to the attention of whatever Linden that would be able to evaluate it and get it in the plans if it&#039;s possible please? (If it&#039;s you, then please take a look and see what you can do) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 04:43, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I have thought about adding a much, much simpler version of this (where you simply get to specify a velocity vector and a face of the prim), but it would be at least a little tricky to implement and there are a number of things of more general use that I&#039;d like to get to first. Some day, though, it would be a great feature.&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 05:51, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:If the server already knows about which face collided and things like the normal of the collision point (and of course the texture parameters of the prim), wouldn&#039;t it be just a matter of basic vector math to get the resulting force and stuff? I imagine this could be a game changer close to the scale of flexies, people moving around a mall on flat conveyors like those on some airports, working escalators, more realistic wheeled and tracked vehicle behavior, people will find all sorts of uses for it. Is there somewhere i can see the stuff you got planned? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 06:01, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;m about to head out (it IS a Saturday night here, haha), so this is probably my last post, at least for a few hours, probably until tomorrow. The problem is related to stability and details about determining which objects to apply the force to and how. In the physics engine, this would be done by modifying the contact points between the conveyor belt and the other bodies. Also, the server doesn&#039;t really know which face collided, which makes it trickier still, as that info would have to be derived dynamically any time a body came in contact with the conveyor belt object. Finally, it would almost certainly break avatar animations which rely on the avatar&#039;s velocity (not the requested motion of the user) to determine when to play a particular animation. Unfortunately, I don&#039;t have a publicly visible list of projects I&#039;d like to complete. But they do include llCastRay (yay progress!), llCastShape (see SVC-5389...I think...the raycast SVC, exposing the Havok vehicle kit, providing for alternative physics representation (so that the shape you see isn&#039;t tied to the shape the physics engine sees, allowing simpler collision geometry), providing control of friction, density, restitution, and gravity, ... the list goes on. Please bear in mind, however, that there is absolutely no guarantee any of these will be shipped as they are mostly unscheduled it isn&#039;t clear what LL&#039;s priorities will be in the coming months. Oh, and of course, given the opportunity, I&#039;d put all of these ideas aside to work on client side prediction which would have HUGE impact on lag, although it wouldn&#039;t provide much in the way of new resident-facing features.&lt;br /&gt;
&lt;br /&gt;
Have a good night,&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 06:24, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
That partial list of projects is, like, my wishlist as an LSL scripter.  You&#039;re my new favorite Linden. ^_^;&lt;br /&gt;
--[[User:Michelle Resistance|Michelle Resistance]] 15:44, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Some of those are among the feature suggestions i&#039;ve filled on pjira :)&lt;br /&gt;
::Falcon rocks indeed!! --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 16:10, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== selfignoring? ==&lt;br /&gt;
&lt;br /&gt;
Is there a way to have the raytrace ignore prims in the same linkset? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:42, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
No, unfortunately this is not possible and would be hacky to implement (though it could be done if there were enough demand for it). It will, however, always ignore a shape that the ray begins inside of. So if you use llGetPos() from a convex prim, that prim will not be returned by the cast. You can always use the UUID of the prim to ignore the result as well.&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 05:46, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== On the topic of limiting it to not work past a distance ==&lt;br /&gt;
&lt;br /&gt;
It was done with llSensor, and what happened? People wasted server resources to overcome the limitation; you still think it&#039;s a good idea? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 08:04, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Nope. I don&#039;t. But llCastRay isn&#039;t artificially limited to a distance. It&#039;s simply limited to work within the region. But that isn&#039;t an artificial limit, it&#039;s a fundamental one: llCastRay uses the physics engine for raycasts. On a given simulator, nothing exists in the physics world outside the region boundaries.&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 09:47, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hm, sorry, i&#039;m not finding it now, but i could swear i had read you saying somthing along the lines of &amp;quot;you wouldn&#039;t want people raycasting from the other side of the sim&amp;quot;, dunno... --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 09:56, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Yes, I did say that. I then proceeded to change my mind. :)&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 18:59, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Is it a logical bug on my script or does it not update fast enough? ==&lt;br /&gt;
&lt;br /&gt;
Does the data llCastRay reads from gets update as often as the position and rotation of phys objects or does it get updated less often? I&#039;m mostly confident that the start position is inside the prim but somtimes the trace will hit the prim somehow, it happens more often when the prim is bouncing around fast. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 11:23, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
That depends on how you&#039;re updating the objects. If you&#039;re calling llSetPos() or similar in your script, those updates will not be processed until later, whereas the llCastRay call will be processed immediately. I suspect llGetPos() will return the value you set with llSetPos() even though the physics object isn&#039;t there yet.&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 19:01, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;I&#039;m personally praying that llCastRay will make simulated projectile weapons essentially obsolete in SL. &amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
I&#039;ve spent a little time exploring the functionality of llCastRay today. From the perspective of a veteran LL damage combat scripter;&lt;br /&gt;
&lt;br /&gt;
In terms of raw utility, llCastRay effectively provides the ability to determine a bullet&#039;s target without the intervening physics. This is an advantage because it means that traditional region crawl caused by irresponsible people spamming physical objects is significantly reduced. It also means that the number of bullets required to send an individual home is reduced; in the case of the firer being able to aim, of course.&lt;br /&gt;
&lt;br /&gt;
The function seems more fitted to abstracted combat with meters and script awareness (determining distance to surfaces, etc) however, because it provides a very large volume of data back to the script calling it but does not impact what it is detecting in any way.&lt;br /&gt;
While it is possible to build a weapon that uses it for projectiles with traditional LL damage, the benefits do not necessarily outweigh the negatives; it effectively moves the majority of work from the source system to the projectiles instead. Using communications such as listens to transfer a target vector from a gun to a bullet on each rez is obviously absurdly inefficient considering the rates at which most people like to fire them and therefore the cast is better placed in the bullets themselves; this means that the bullets cannot be temporary prior to casting and therefore realistically on rez, although they can simply be set temporary subsequent to casting. Regardless of the method of acquiring the target position, the bullet must still travel to the location to inflict damage; a stacked primparams position is the obvious solution, as it also allows for temponrez and physics to be set in the same call.&lt;br /&gt;
&lt;br /&gt;
Would it be possible to implement a sister (if somewhat crippled) function to llCastRay that has the capability to inflict LL damage on agents? While I see a great deal of value in llCastRay it is not necessarily preferable to physics as a combat tool. Something along the lines of an llCastDamage which is restricted to cast from the root position of the object calling it along a fixed axis. In a similar manner to a sensor, except with a damage variable similar to the llDamage() prim param setter that affects only the first thing it intersects. Additional fluff could be a contact sound triggered at the point of intersection, contact particles and so forth.&lt;br /&gt;
&lt;br /&gt;
tested projectile, just for reference:&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
vector xyz(vector in)&lt;br /&gt;
{&lt;br /&gt;
    if (in.x &amp;gt; 255.9) in.x = 255.9;&lt;br /&gt;
    else if (in.x &amp;lt; 0.1) in.x = 0.1;&lt;br /&gt;
    if (in.y &amp;gt; 255.9) in.y = 255.9;&lt;br /&gt;
    else if (in.y &amp;lt; 0.1) in.y = 0.1;&lt;br /&gt;
    if (in.z &amp;gt; 4095.9) in.z = 4095.9;&lt;br /&gt;
    else if (in.z &amp;lt; 0.1) in.z = 0.1;&lt;br /&gt;
    return in;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llCollisionSound(&amp;quot;&amp;quot;,0.0);&lt;br /&gt;
        llCollisionSprite(&amp;quot;&amp;quot;);&lt;br /&gt;
        llSetDamage(100.0);&lt;br /&gt;
    }&lt;br /&gt;
    on_rez(integer s)&lt;br /&gt;
    {&lt;br /&gt;
        if (!s) return;&lt;br /&gt;
        vector p = llGetPos();&lt;br /&gt;
        vector d = &amp;lt;20.0,0.0,0.0&amp;gt;*llGetRot();&lt;br /&gt;
        list ray = llCastRay(p,xyz(p+d),0,0);&lt;br /&gt;
        list tgt = [PRIM_POSITION,llList2Vector(ray,1)];&lt;br /&gt;
        tgt += tgt += tgt += tgt += tgt += tgt;//1,2,4,8etc&lt;br /&gt;
        llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_TEMP_ON_REZ,TRUE]+tgt+[PRIM_PHYSICS,TRUE]);&lt;br /&gt;
        llDie();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
[[User:Jeremy Duport|Jeremy Duport]] 19:51, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== This is *not* a viable replacement for projectiles ==&lt;br /&gt;
&lt;br /&gt;
llCastRay is a great idea, and I&#039;ll make heavy use of it in a wide range of applications, but there&#039;s no way it&#039;s going to replace scripted bullets in any meaningful way.&lt;br /&gt;
&lt;br /&gt;
There&#039;s just no other way to get a decent visual effect for bullets.  Particles are an enormous performance drain on the client [and don&#039;t anyone tell me to just get a better machine, I&#039;m a poor student, damnit], and of course look the same from every direction.  Scripted bullets are also the only timely way to get a particle effect at unscripted impact locations.&lt;br /&gt;
&lt;br /&gt;
There&#039;s also the problem of communicating effectively between a gun and a scripted target.  With combat going on, something like a listen on targets and regionsay from guns is going to trigger zillions of unnecessary events.  Sure, *I* know how to properly hash UUIDs to integers, and there&#039;s reasonable code for that on this wiki, but have you actually seen the kind of shit most scripters in SL try to pull?  Note that people are *still* using resizer scripts in every prim of a linkset and controlling them with linked messages.&lt;br /&gt;
&lt;br /&gt;
Also, despite being sidetracked by https://jira.secondlife.com/browse/SVC-5953, I&#039;m a week or so of work away from releasing several weapons that trigger bullet rezzes via changed events, rather than by inked messages. Tyro Dreamscape has already successfully demonstrated this method as a near-zero-sim-impact way of squeezing high firing rates of scripted bullets out of as few rezzing scripts as possible.  Sure, you could bring up sim garbage collector woes, or my argument from above about the absurdly low coding standards among scripters, but the former has not been an issue in practice, at least with intentionally minimalist bullet scripts, and the latter is something I&#039;m expecting market forces to help with.  We *can* do scripted bullets the right way.&lt;br /&gt;
&lt;br /&gt;
I&#039;d really like someone to prove me wrong.  Thoughts?&lt;br /&gt;
&lt;br /&gt;
--[[User:Michelle Resistance|Michelle Resistance]] 15:55, 5 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ummm, you do realize that you&#039;re still just calling a function in one script, that triggers an event in another, right?  Except that where a linked message merely communicates between scripts, the changed() event requires triggering a function that changes some parameter of the other object, so you&#039;re asking the simulator to do a small bit of extra unnecessary work in between calling the function and triggering the event.&lt;br /&gt;
&lt;br /&gt;
You are right that scripted bullets can be done the right way.  But the right way doesn&#039;t mean reinventing the wheel or creating a Rube Goldberg machine, it requres understanding what the wrong way is, why certain things use extra processing resources, and finding the most effective ways to mitigate those problems.  Keep in mind that people have tried to use llResetOtherScript() and actually believed that it was more efficient.  It was the same sort of reasoning involved, where someone thought &amp;quot;method A is laggy, therefore method B will be better.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is quite possible to make efficient physical projectile weapons.  But just because many people are unable to do so does not mean that you need to find some supersekret new method for doing so.  It is simply a matter of using good coding practices like KISS.  Granted, it&#039;s oh so much easier to market something that&#039;s new and different, but that doesn&#039;t make it so.&lt;br /&gt;
&lt;br /&gt;
[[User:Jahar Aabye|Jahar Aabye]] 19:24, 5 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Passing data through a changed event, at least the way Tyro and I have been doing it, has far less impact on the sim than the string operations that most people do when communicating between scripts via link messages.  Try it, it&#039;s rather impressive.  And, to dispel concerns that it&#039;s just a gimmick, I&#039;ll explain exactly what I&#039;m doing and (probably) why it works better.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve got a main script and several rezzer &amp;quot;thread&amp;quot; scripts, all in the same prim (they don&#039;t need to be, but that&#039;s how I&#039;m doing it), a hollow sphere.  When a user pulls the trigger (or an automated weapon decides to open fire), llSetColor(&amp;lt;AUTO, timer, aim&amp;gt;) is called [llSetLinkColor also works, though llSetLinkPrimitiveParams and the fast variant don&#039;t, as they don&#039;t trigger a changed event], where AUTO is a predefined floating-point number identifying that it&#039;s a firing order, timer is the argument we want the thread to past to llSetTimerEvent to control the firing rate, and aim is either 1.0 or 0.0, signifying if I&#039;m using the prim&#039;s other face to provide additional data about where to aim the bullets (which we can do without triggering a second changed event, if the llSetColor call for the other face is done immediately before or after the firing-order call).  This has been significantly more responsive (in LSO, anyhow) than a linked message in all my tests, and can easily support rather egregious firing rates [~25 bullets per second with five threads - well under the goo fence limit, though probably more than you&#039;d want] from many simultaneous users without affecting sim FPS.  My team&#039;s theory, that led us to try this in the firs place, was that the link_message dispatch code on the sim side is slowed by argument passing and filtering in a way that the changed event is not.  That we&#039;re only performing floating-point operations when using face color as an argument buffer seems to make the difference.  Certainly, one could use the link_message integer parameter to do filtering, and I write all my APIs that way, but it appears the extra overhead of passing string and key arguments, even when not used, is enough to upset the sim when performed at high speed.  As a side benefit, using the changed event keeps the rezzer threads from needing link_message handlers, reducing the number of scripts that need to filter out other communication happening in the linkset.&lt;br /&gt;
&lt;br /&gt;
Hope that allays your concerns.  If not, I&#039;ll be here all week. ~_^&lt;br /&gt;
&lt;br /&gt;
--[[User:Michelle Resistance|Michelle Resistance]] 23:06, 5 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::Well yes, you&#039;re simply shifting a portion of the load from the VM (which would handle the linked messages) to the Database and Simulator (which are handling the altering of the primitive&#039;s parameters and which then triggers the VM&#039;s changed() event).  This does not make it particularly more efficient, as I mentioned before you still have a function call and an event triggered, you&#039;re merely routing it through another method, in this case the simulator, which has to then alert every client within draw/LOD distance as to the nature of the change.  I am fully aware of what you are doing and how you are doing it, you are at least the third person in as many years who has mentioned it.&lt;br /&gt;
&lt;br /&gt;
::Rather than a lecture on how to script guns, I&#039;ll simply say that if it works for you, then that&#039;s all that matters.  There are efficient ways to use linked messages, and there are incredibly inefficient ways to use linked messages.  Similarly, I am certain that people will find right ways and wrong ways to handle llRayCast() if it is ever implemented.  Incorrect methods will undoubtedly spread through the grapevine with assurances that &amp;quot;this supersekrit way is teh best evar!!!11!!&amp;quot;  Market forces have as of yet had minimal effect on poor scripting with regards to guns in SL, I wouldn&#039;t expect that to change at any time in the future.  As you correctly note, many fashion designers still put resize scripts into every prim of hair.&lt;br /&gt;
&lt;br /&gt;
::In some respects, I doubt that many amateur gun scriptors will be much different after raycasting than before.  It may be less likely to be used by many amateur gun scripters simply because the default LL Damage system is built around physical collisions, and presumably that would remain the same.  Also, combat systems that use raycasting would likely require at least a decent understanding LSL or else might use prewritten no-mod scripts to do the raycasting.  To that extent, I do worry that raycasting may appear to be more efficient when it debuts on the grid, if only because of self-selection in terms of who is using it and how it is used.  This is probably something that should be considered if llCastRay() is ever implemented, as it does have an effect on how to interpret any sort of metrics gathered when trying to determine its relative efficiency compared to bullet-based guns.&lt;br /&gt;
&lt;br /&gt;
::In the end, it will be one more tool.  I would hope that the devs at LL do not really think that this will completely replace physical projectiles, but it is nice to have the option.  Similarly, I do hope that people understand that the relative efficiency of various guns on the grid varies wildly, and that the scriptor has a far greater impact on the relative efficiency of a gun than whether it uses physical bullets or llCastRay() when it is implemented.&lt;br /&gt;
&lt;br /&gt;
[[User:Jahar Aabye|Jahar Aabye]] 00:18, 6 July 2010 (UTC)&lt;br /&gt;
::: Latelly i&#039;ve been using llTarget and not_at_target to have stuff run as fast as the server allows without actually using somthing like while(true) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 00:31, 6 July 2010 (UTC)&lt;br /&gt;
:::: In my tests, I&#039;ve found that LSO loops seem to end up *slower* than repeating events like timers and not_at_target.  &#039;Sweird. --[[User:Michelle Resistance|Michelle Resistance]] 00:47, 6 July 2010 (UTC)&lt;br /&gt;
:You could use llRayCast to verify if the aiming hits anyone,and then rez a &amp;quot;bullet&amp;quot;, posJump it to the target and make it phys to collide if you wanna use collisions to relay hits. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 23:57, 5 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Actually, that would probably be the worst of all worlds.  You&#039;re still rezzing a bullet, still moving it to the target, still making it physical, still colliding it.  All of the things that llCastRay() is attempting to prevent.  Also, most combat systems that involve collisions limit (or should limit) the minimum velocity of a collision.  To get around this, one would probably have to add a call to llApplyImpulse() or something similar.  At the end of the day, you wind up with a situation not much better off than just firing a bullet.&lt;br /&gt;
&lt;br /&gt;
:::llCastRay() is probably best implemented in a combat system in a manner similar to current sensor-based combat systems, which have been around for years.  I&#039;m not sure that sensor-based (or raycasting-based) combat is any better or worse than physical bullet-based combat.  Each has different tradeoffs, and at the end of the day it&#039;s going to come down to how these functions are worked into the system that gets set up.  Whether using sensors, raycasting, or bullets, it&#039;s all about understanding the strengths and weaknesses of each system, and working with that in mind.  Raycasting does have some significant strengths, but only if you take advantage of them.  Raycasting, if done correctly, will probably take some load off the physics engine at the possible cost of runtime efficiency and memory.  Physical bullet systems are simpler and may have an advantage in terms of runtime efficiency and memory use if done correctly, at the expense of offloading more of the work on the physics engine that has to deal with all of the active objects and the collisions generated.&lt;br /&gt;
&lt;br /&gt;
[[User:Jahar Aabye|Jahar Aabye]] 00:18, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Ahoy folks!&lt;br /&gt;
&lt;br /&gt;
I don&#039;t know enough about the issues in LSL to comment on most of the topics brought up in this thread. But with regard to the issues around the appearance of raycasts vs rezzed bullets, once you use llCastRay, you&#039;ll at &amp;lt;i&amp;gt;least&amp;lt;/i&amp;gt; be able to set your bullets phantom. This prevents the physics engine from needing to check for collisions with anything but the land. Unfortunately, due to an old bug, collision checks against the ground are still very expensive. We expect to fix this by 1.44 at the latest. Once that&#039;s done, phantom bullets will be much more efficient.&lt;br /&gt;
&lt;br /&gt;
::Phantom bullets would give us the problem of having to inform them somehow of a hit so they can [promptly] self-destruct instead of continuing to pass through things… unless you&#039;re suggesting the bullets themselves do llCastRay and short circuit the physics system.  That sounds like a terrible hack, though.  Shouldn&#039;t it be more efficient to let the physics engine do its thing, rather than going through the twisty little passages of LSL VMs? --[[User:Michelle Resistance|Michelle Resistance]] 17:02, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Regarding the matter of rezzing a bullet and then using the posjump trick (assuming that refers to the llSetPrimitiveParams hack where you repeatedly set the prim&#039;s position in a second call), that will actually be substantially less inefficient in 1.40 (when we finally get it right!). The reason is that in the past, each time you set the prim&#039;s position, the physics world would be updated, sometimes many many times in a frame. That is no longer the case (only the final position is actually used).&lt;br /&gt;
&lt;br /&gt;
::&amp;quot;[[PosJump]]&amp;quot; actually refers to a different &amp;gt;10m movement hack than what you&#039;re talking about, which is known as &amp;quot;[[WarpPos]]&amp;quot;.  PosJump is very much preferable, as the LSL script doesn&#039;t have to waste time and memory calculating a series of intermediate steps… but it doesn&#039;t work with llSetLinkPrimitiveParamsFast, just the slow variety. --[[User:Michelle Resistance|Michelle Resistance]] 17:02, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Last i tried it did work with llSetLinkPrimitiveParamsFast, did you test it yourself? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 17:31, 6 July 2010 (UTC)&lt;br /&gt;
::::Yes, just a few weeks ago… though now that I think about it, I could have been confusing the issue with that posjump fails when the object is physical. --[[User:Michelle Resistance|Michelle Resistance]] 16:54, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
And yes, an LSL busy loop (e.g., while(TRUE)) is very, very inefficient. It uses as much of the sim&#039;s resources as available until it is cut off for the frame. Even the most inefficient event scheme would probably be better than a busy loop.&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 03:25, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::I&#039;ve found that even a bounded for loop is slower than a timer, in practice.  Any idea why this might be? --[[User:Michelle Resistance|Michelle Resistance]] 17:02, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
In LSO it makes sense that using [[changed]] would be faster than the [[link_message]]. The changed event has one parameter, link_message has four; two of which are strings. It takes more computer time to push a link_message event onto a scripts event queue then it does to push a changed event. It takes more time to copy the values into script memory and trigger the event. Mind you, using [[llSetColor]] this way is going to cause a huge number of updates that the sim will try and send to all users in sight of the weapon. For a long time I thought we need a better comm event, no string, no key, just a list. Than I latched onto C# and the idea of building custom events. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 16:21, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Possibility to limit list length? ==&lt;br /&gt;
&lt;br /&gt;
I am concerned about the memory issues posed by this function.  It was mentioned above, but not really fleshed out.  In order to be useful for a combat perspective, you can&#039;t really set any of the flags (that is, it must return all agents and objects) so that you know whether there is a wall or some other barrier between yourself and the target.  This means that you can get a potentially very long list with a UUID and vector position for each object hit.  This could easily eat up several kb of script memory.&lt;br /&gt;
&lt;br /&gt;
However, limiting the function to returning the first object hit (as has been mentioned as the possible final version) also removes some potentially interesting uses of this function.  For example, you could have a situation where you get one result if it reaches an avatar unimpeded, another if there is a single object between you and the other av, and then no result if there is more than one object.&lt;br /&gt;
&lt;br /&gt;
Would it be possible to compromise, and add another variable to input into the function to select the total number of objects to return?  So you could have: &lt;br /&gt;
&lt;br /&gt;
list llCastRay(vector start,vector end,integer filters,integer flags,integer num_returned)&lt;br /&gt;
&lt;br /&gt;
Where num_returned would be the total number of objects hit, starting with the closest.  It could be enumerated starting from 0 so as to match the values in the returned list, or from 1 if you would need to use 0 to set it to no limit.&lt;br /&gt;
&lt;br /&gt;
As for this function making physical projectile combat obsolete, I do not believe that this will happen.  I see this as akin to how sculpties have enhanced building: they give builders more options and allow for a greater variety of creative designs, but they have not obviated the use of regular prims.  Similarly, I think that this feature may increase the options available when developing combat systems and weapons.  However, I think that there are advantages to physical projectiles (such as the ability to code for ballistic trajectory).  I have used sensor-based combat systems before (although this has many advantages over those as well), and I have found that those feel a bit too much like playing &amp;quot;laser tag&amp;quot; especially when used over longer distances.&lt;br /&gt;
&lt;br /&gt;
I think that this will create more options for combat, it may allow for new types of combat, but there are always tradeoffs inherent in any system.  Raycasting methods will have advantages and disadvantages, they will be more efficient in some ways and less in others.  It will be nice to have this as a new option, but I worry about overselling this as a complete replacement.  After all, the Mono VM was marketed as being the wave of the future that would make LSL-compiled scripts obsolete.  While many scriptors knew to be cautious with a new VM, LL&#039;s overhyping of the system created a marketing environment where customers were asking if every product was Mono.  This resulted in Mono being used in a vast number of situations where it was not only unnecessary but entirely inappropriate.  &lt;br /&gt;
&lt;br /&gt;
I worry about a similar situation unfolding here, where marketing llCastRay as a complete replacement for physical projectiles will encourage non-technical people to demand &amp;quot;those new ray guns LL keeps telling us about, why haven&#039;t you been making those?&amp;quot;  Then these same people will inevitably come back a week later demanding why the RayCast &amp;quot;bullets&amp;quot; behave differently.  All that I am asking is that you please acknowledge that non-technical people will read these announcements without understanding the technical nuance and the inherent tradeoffs.  Overhyping something as a &amp;quot;complete replacement&amp;quot; when it is a new feature that allows for new options may only wind up creating new headaches.  A new feature that opens new doors and allows for new options for creators is great, it is wonderful.  No need to oversell a good thing.&lt;br /&gt;
&lt;br /&gt;
[[User:Jahar Aabye|Jahar Aabye]] 19:24, 5 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
In the final version of llCastRay, if more than 1 hit can be returned I&#039;ll be sure to give you the ability to select some kind of limit (even if it&#039;s only a binary &amp;quot;first hit or all N hits&amp;quot; choice--where N is definitely a finite number determined by the specification). &lt;br /&gt;
&lt;br /&gt;
Also, if using llCastRay feels too much like laser tag, try adding a small delay before the raycast executes or adding some randomness to the cast&#039;s direction. As for the ballistic trajectory, if that&#039;s really critical, there are ways to simulate it. For example, you could make 4 ray casts approximating the parabolic curve, but you&#039;d have the possibility of performing an early-out if one of the first casts hits something.&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 03:33, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Yes, randomness for the direction is easily doable by modifying existing code.  What I meant about ballistics isn&#039;t just the trajectory, drop, and inaccuracies like random variations in direction.  A delay before firing can be done, but one factor in the current projectile combat is that your aim is highly dependent upon the distance to your target and how this relates to the target&#039;s movement.  With projectiles, it is far easier to hit a close target than a far one, and if the target is moving, this has a disproportionate impact on difficulty with a farther target.  This is because of the time that it takes for the bullet to reach the target, because the bullet&#039;s travel is not instant.&lt;br /&gt;
&lt;br /&gt;
::Now, because SL physics limits bullet velocity to far less than in real life (our SL bullets are usually 115 m/s while a 5.56mm round from an M16 is well over 900 m/s), the result is that it greatly exaggerates the effects of distance and movement, but distance in SL is always a somewhat arbitrary measurement.  So I recognize that physical projectiles are far from perfect, and plenty of people have complained of difficulty when they first try SL combat after experience with other video and computer games that probably are using raytracing or similar technology.  But it does add a satisfactory level of difficulty and skill to competitions.&lt;br /&gt;
&lt;br /&gt;
::I know this is probably not feasible, and I certainly don&#039;t want it to wind up polluting the code and making everything more difficult, but is there any way to give the ray a specific velocity, rather than being nearly instant?  I&#039;m not just talking about a delay between the firing input and casting the ray, but having the ability to set the ray to move at a specified speed so that distance to target matters?  I mean, I suppose that I could fire multiple staggered rays to try to imitate this, and have the script read data from each successive ray only between certain distances....but that&#039;s gonna get really inefficient really fast, while the simulator is already calculating avatar distance and movement.&lt;br /&gt;
--[[User:Jahar Aabye|Jahar Aabye]] 05:47, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Hey Jahar, I see what you&#039;re saying, but no, there&#039;s no way to slow down the ray, it&#039;s a synchronous, instantaneous query into the physics world&#039;s current state. You&#039;ll just need to come up with a new clever way to inject difficulty into things :) (I&#039;m usually terrible at first person shooters and those have stupid AIs and instantaneous raycasts. I&#039;m sure a group of human enemies can find a way to make hitting them challenging while still being fun, even if the bullets travel faster now.) Also, given that the physics hitbox of a player is pretty narrow, I&#039;m guessing it may be harder than you expect to hit a moving target from the other side of the sim, even with a raycast. But then, I haven&#039;t tried.&lt;br /&gt;
:::[[User:Falcon Linden|Falcon Linden]] 03:46, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Raycast Damage ==&lt;br /&gt;
&lt;br /&gt;
Hey folks,&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been trying to coalesce some of the most significant suggestions for llCastRay, and one theme that seems consistent is that weapon system makers need a way to be notified when hit by a ray. I&#039;m thinking of two possible features:&lt;br /&gt;
&lt;br /&gt;
1) For integration with LL damage, it might be possible to create another parameter that takes a list of parameters (albeit with a bit more strict requirements than in primparams args due to inefficiencies in list processing). In the future, this could include a version number, but in the meantime, one possible parameter could be RC_DAMAGE which would apply a requested amount of damage to the first object hit if that object is an avatar and if the region is damage enabled, etc.&lt;br /&gt;
&lt;br /&gt;
2) An event, ray_impact, that the caster script could choose to trigger in impacted objects. This would, in principle, alleviate many of the security concerns around raycast-based weapons systems. In the interests of full disclosure, however, I should tell you that (a) I don&#039;t know how to create a new event (I&#039;ll have to speak to Kelly Linden) and therefore, (b), I don&#039;t know if implementing this feature would be prohibitive in terms of engineering time. But let&#039;s suppose I &amp;lt;i&amp;gt;could&amp;lt;/i&amp;gt; implement this. What information would you want the receiving object to be able to obtain in this event? The fewer the better, so my first instinct would be no information (it&#039;s enough to know you were hit). Beyond that, knowing the exact location of the hit could be nice, as would knowing the UUID of the casting object (maybe?) and perhaps receiving bit of user data provided in the llCastRay call. Would that be helpful? How might you use it?&lt;br /&gt;
&lt;br /&gt;
Cheers,&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 03:47, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: #1 sounds excellent, though it&#039;s been notoriously difficult to get people to play fair with LL damage.&lt;br /&gt;
&lt;br /&gt;
:: A ray_impact event would be a godsend.  The UUID of the casting object would be essential, and a hit location [and maybe hit normal] would be very useful.  Ideally, an appropriate set of llDetected* functions should work inside the ray_impact event similarly to how they&#039;re used in a touch event.  Might need a new one, like llDetectedRayNormal.  Still, just an event with a signature like ray_impact(key id, vector pos, vector norm) would be massively useful.  Let&#039;s see… I&#039;d be using llCastRay for collision avoidance on robots, and ray_impact would make it easier for the robots to exhibit schooling behaviors.  Similarly, such robots could interact with scripted objects in their environment (door controls, moveable boxes?) elegantly.  Other uses… target ranges for raycast-based weapons… missile lock detection in fighter combat… assuming we could use it in attachments for impacts to the avatar, combat meters for raycast-based guns… AR-like user interfaces implemented by raycasts from a HUD [though the math for generating such rays may be rather complicated]… line-of-sight communication between objects and avatars… I&#039;m sure there are more that I can&#039;t think of at the moment.  Bottom line, adding functionality to LSL is a Very Good Thing. --[[User:Michelle Resistance|Michelle Resistance]] 17:46, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Falcon, I&#039;ve been silent on this point because I don&#039;t agree with the naysayers; &amp;lt;tt&amp;gt;llCastRay&amp;lt;/tt&amp;gt; is exactly what I&#039;ve been needing for the combat system I&#039;m building.  For those that want to use Linden Damage, I think &amp;lt;tt&amp;gt;llTakeDamage()&amp;lt;/tt&amp;gt; (perhaps accepting negative values to allow for healing) would be valuable, but beyond the scope of this project.  I don&#039;t personally hold with the logic that it&#039;s marginally hard to write non-laggy chat communications, so we should expect people to write non-laggy bullets and guns.  It&#039;ll require combat to be done differently, so it&#039;s not an evolutionary change, but I don&#039;t see that as a barrier.&lt;br /&gt;
&lt;br /&gt;
That said, if it can be done, RC_DAMAGE would be a nice thing to have.  I do build my weapons to fail down to Linden damage if no supported combat system is found, and if Linden damage is enabled.  &amp;lt;tt&amp;gt;ray_impact&amp;lt;/tt&amp;gt; would also be nice, especially if it&#039;s only explicitly triggered; UUID, impact point, and an arbitrary integer constant sent by the ray caster would be the values I&#039;d see as most useful.  Perhaps rather than go the whole list of parameters route for RC_DAMAGE, just add another integer parameter to &amp;lt;tt&amp;gt;llCastRay&amp;lt;/tt&amp;gt; that would be used differently with different flags?  In any event, not having either of these would in no way dampen my enthusiasm for this feature or impact my plans for using it, assuming it gets deployed. [[User:Jack Abraham|Jack Abraham]] 19:23, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::I think that suggestion #1, or some similar functionality, would be essential if you want this function to work with the current default LL Damage system.  The LL Damage system currently requires a physical collision between an avatar and an object scripted with llSetDamage().  This means that I can simply fire a bullet at an avatar and apply damage, but raycasting alone would not be able to perform any sort of damage without also requiring some sort of bullet unless you add this feature.&lt;br /&gt;
&lt;br /&gt;
::Suggestion #2 also sounds useful, if possible.  I suspect that many people will still utilize weapon-meter comms even if you include this function, because there is still greater security there in terms of being able to limit what can do damage within a system.  However, Michelle outlines many other excellent uses for including this feature.  In addition to making it far easier to construct non-avatar targets, it dramatically increases the potential usage for raycasting beyond just a replacement for projectiles.  I was just talking to a plane maker last night about how raycasting could make laser-guided bombs far more interesting, and while that example wouldn&#039;t require this extra feature, it does illustrate that raycasting can evolve into so many other things besides just a bullet, and so adding in the feature to detect a raycast may expand the use of raycasting into all sorts of applications beyond what any of us could envision.&lt;br /&gt;
&lt;br /&gt;
::As for what information might need to be passed?  Jack&#039;s suggestion of adding an all-purpose integer definitely sounds like the most important.  Obviously an integer would be required to set damage, and having the ability to send an integer with a raycast would also allow for expanded use outside of LL Damage.  It could allow a weapons system to differentiate between raycasts of different &amp;quot;caliber&amp;quot; or allow for raycasts to broadcast a &amp;quot;team&amp;quot; number, or to differentiate between raycasts being used as &amp;quot;projectiles&amp;quot; from those being used as &amp;quot;lasers&amp;quot; or in some other sensing capacity, or a million other situations where the ability to program an object with multiple responses to a raycast would dramatically expand its utility.  An integer is also the simplest piece of information that could be added, and you&#039;ll need to add it anyways if you add LL Damage functionality.&lt;br /&gt;
&lt;br /&gt;
::The UUID of the originating object would also be useful, as would the owner&#039;s UUID.  While it may sound redundant, I wonder about situations where the owner of the originating object might not be in the region, I believe that llGetOwnerKey() may not work in those situations, right?  So the owner UUID would be important.  It might also be useful for llCastRay() to send a UUID of its own choosing, and here I&#039;m thinking of how it is common in SL aviation for planes to be guest-flyable, so the owner of the object may not be the one using it.  However, workarounds already exist for this with bullet-based combat systems, so maybe it&#039;s not essential.  Of course, if it simply broadcast a UUID (or string) of the scriptor&#039;s choosing, that would allow whoever is scripting the object to decide whether to send the object UUID, the owner UUID, or the user&#039;s UUID, so it might be even better than automatically sending the object and owner UUIDs.&lt;br /&gt;
&lt;br /&gt;
::Finally, it might be useful to include the vector position of the originating point of the raycast.  Not where it hits you, but where it was sent from.  Granted, if the object/owner/user UUID is included, then llGetObjectDetails() might be used to get this information, but for some instinctive reason that I can&#039;t quite figure out at the moment, I feel like this might be a useful thing to add.  In the end, though, if you have to include one bit of information, make it all purpose integer that could be used to determine LL Damage or passed to an event.  If at the end of the day you can only pass on one piece of info, an integer would give you the most utility with the least overhead.&lt;br /&gt;
&lt;br /&gt;
::[[User:Jahar Aabye|Jahar Aabye]] 06:43, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:::How about the shooter just sending the info about how the shot originated (also thigns like the gun used etc) via chat and then the potential target(s) calculate whether they were hit or not and adjust their owner health points as needed? (I just thought about that approach, haven&#039;t put much thought into it)&lt;br /&gt;
::: Btw, does everyone uses gravitiless bullets? I would expect people going for the more realistic stuff would use physical bullets that fly a ballistic trajectory... Can a ballistic arc be used instead of a straight line &amp;quot;ray&amp;quot;  with raycasting? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 06:56, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::Tigro, in real life, a 9mm round of typical self-defense ammunition has a muzzle velocity of 1120ft/s or 340m/s. As another commenter pointed out, a 5.56 NATO round (think M16) has a muzzle velocity of about 3000ft/s or 915m/s. Those two rounds would travel a sim diagonal (362m) in 1.06 and  0.4s, respectively. During that time period, if fired horizontally, they would fall about 5.5m and about 0.79m, respectively. Sounds like a lot, except that a pistol wouldn&#039;t have a range anywhere near that large in reality (you couldn&#039;t POSSIBLY aim a pistol accurately at a target nearly 4 football fields away, at least not by hand, and not without some kind of crazy scope...not to mention that wind would slow it down substantially over that distance) and for the M16, the drop is not significant given the 350m distance being traveled. So while no, you can&#039;t use a ballistic arc instead of a straight line, think about whether you really need to. And if you discover you really do, you could always approximate it with 4 line segments. &lt;br /&gt;
::::[[User:Falcon Linden|Falcon Linden]] 04:04, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Get Alt-Zoom camera cursor position and surface orientation ==&lt;br /&gt;
&lt;br /&gt;
Here is an example I made, how to get the camera cursor position when you Alt-Zoom on any object surface with the &#039;&#039;&#039;llCastRay&#039;&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
The script also calculates the surface orientation at the cursor position and rezes a prim on a top of surface. The Z-Axis of a rezed prim is aligned with the Normal vector of a surface at a given point and the X-Axis points in a way of your camera sight.&lt;br /&gt;
&lt;br /&gt;
To test the script make a new HUD object and put the script below into it. Also put one standard cube prim (named Object) into its inventory. Attach the HUD and Alt-Zoom to any curved surface in region, but not more than 10m far from you. Then click on the HUD and a new prim will be rezed on a top of surface where the Alt-Zoom cursor of your camera points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
//                    &lt;br /&gt;
//      Scriptname:  Get Alt-Zoom position and Surface Orentation&lt;br /&gt;
//      Version:     1.0&lt;br /&gt;
//      Date:        06.07.2010&lt;br /&gt;
//&lt;br /&gt;
//      Description: Gets the position of the camera cursor&lt;br /&gt;
//                   when a user Alt-Zumes on a surface of any object and&lt;br /&gt;
//                   rezes a prim on this point and orients it with a surface&lt;br /&gt;
//&lt;br /&gt;
//      How To:      - Create a new HUD (cube), size = X=0.05 y=0.05 Z=0.05&lt;br /&gt;
//                   - Put this script on it and attach it as a HUD&lt;br /&gt;
//                   - Insert a standard prim (Cube 0.5m) into HUD inventory (named as Object)&lt;br /&gt;
//                   - Alt-Zoom with your mouse to any object surface in the region&lt;br /&gt;
//                   - Without moving your camera, click on this HUD&lt;br /&gt;
//                   - You will get the camera cursor position and surface orentation&lt;br /&gt;
//                   - An Object from HUD inventory will be rezed on a top of Alt-Zoomed surface&lt;br /&gt;
//                     perfectly aligned with surface and with X-axis pointed to your line of sight&lt;br /&gt;
//&lt;br /&gt;
//      Tips:        To see the camera cursor, enable: Advanced-&amp;gt;Character-&amp;gt;Show Look At in your Advaned Menu&lt;br /&gt;
//                   Rez a big sphere to make a curved surface in a region and Alt-Zoom on it.                 &lt;br /&gt;
//&lt;br /&gt;
//      Notes:       You must be at least 10m close to Alt-Zoom position (llRezObject() limitation)&lt;br /&gt;
//                   There&#039;s no &amp;quot;clamping code&amp;quot; included to cut the rays to be inside of a region&lt;br /&gt;
//&lt;br /&gt;
//      Creator:     Teleworm Gelber&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        if (llGetAttached() &amp;gt; 0)&lt;br /&gt;
        {&lt;br /&gt;
            llRequestPermissions(llGetOwner(), PERMISSION_TRACK_CAMERA);&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            llOwnerSay(&amp;quot;Attach me as a HUD&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    run_time_permissions(integer permissions)&lt;br /&gt;
    {&lt;br /&gt;
        llOwnerSay(&amp;quot;Alt-Zoom on any curved surface in the region and then click me to get the Alt-Zoom cursor coordinates and an Object will be rezed there&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        vector   camPos;        // camera position&lt;br /&gt;
        rotation camRot;        // camera rotation&lt;br /&gt;
&lt;br /&gt;
        vector   rayEnd;        // ray end vector&lt;br /&gt;
&lt;br /&gt;
        vector   curPos;        // Alt-Zoom cursor position&lt;br /&gt;
        rotation curRot;        // Point on a surface rotation (Z-axis = SurfaceNormal, X-axis = line of sight)&lt;br /&gt;
&lt;br /&gt;
        vector   fwd;           // surface Forward vector&lt;br /&gt;
        vector   left;          // surface Left vector&lt;br /&gt;
        vector   normal;        // surface Normal vector&lt;br /&gt;
&lt;br /&gt;
        list     rayData;       // ray cast return data&lt;br /&gt;
&lt;br /&gt;
        if ((llGetPermissions() &amp;amp; PERMISSION_TRACK_CAMERA) != 0)&lt;br /&gt;
        {&lt;br /&gt;
            // getting camera location&lt;br /&gt;
            camPos = llGetCameraPos();&lt;br /&gt;
            camRot = llGetCameraRot();&lt;br /&gt;
&lt;br /&gt;
            // Cast a ray in a line of your sight (10.0 means llRezObject() limitation)&lt;br /&gt;
            rayEnd   = camPos + 10.0 * llRot2Fwd(camRot);&lt;br /&gt;
&lt;br /&gt;
            rayData = llCastRay(camPos, rayEnd, 0, RC_GET_NORMAL);&lt;br /&gt;
&lt;br /&gt;
            if (llList2Integer(rayData, -1) &amp;gt; 0)   // check status code&lt;br /&gt;
            {&lt;br /&gt;
                // get the Alt-Zoom cursor position and orentation&lt;br /&gt;
                curPos = llList2Vector(rayData, 1);&lt;br /&gt;
                normal = llList2Vector(rayData, 2);&lt;br /&gt;
&lt;br /&gt;
                // calculate axis for point oirentation&lt;br /&gt;
                left = llVecNorm(normal % llRot2Fwd(camRot));&lt;br /&gt;
                fwd  = left % normal;&lt;br /&gt;
                &lt;br /&gt;
                curRot = llAxes2Rot(fwd, left, normal);&lt;br /&gt;
&lt;br /&gt;
                llOwnerSay(&amp;quot;Alt-Zoom Position: &amp;quot; + (string) curPos);&lt;br /&gt;
                llOwnerSay(&amp;quot;Point Rotation: &amp;quot;    + (string) curRot);&lt;br /&gt;
&lt;br /&gt;
                // rez an Object on a top of hit surface, 0.25 means the prim center offset from surface (0.5m cube)&lt;br /&gt;
                llRezObject(&amp;quot;Object&amp;quot;, curPos + &amp;lt;0.0, 0.0, 0.25&amp;gt; * curRot, ZERO_VECTOR, curRot, 0);&lt;br /&gt;
            }&lt;br /&gt;
            else&lt;br /&gt;
            {&lt;br /&gt;
                llOwnerSay(&amp;quot;Nothing hit, try again&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            llOwnerSay(&amp;quot;Attach me as a HUD first&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    on_rez(integer par)&lt;br /&gt;
    {&lt;br /&gt;
        llResetScript();&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:Teleworm Gelber|Teleworm Gelber]] 23:08, 6 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Inaccurate (buggy) position and normal ==&lt;br /&gt;
&lt;br /&gt;
I don&#039;t really have time for this, ... but I tried it out with a quick script (see below)&lt;br /&gt;
and my conclusion is that the place that is reported for the hit is very inaccurate at times.&lt;br /&gt;
It certainly isn&#039;t equal to the physical (collision) shape of objects, for example the place&lt;br /&gt;
another physical object would lay, or where you&#039;d stand if you stood on top of a prim with&lt;br /&gt;
your avatar, and often it&#039;s just near random (actually, this is clearly a bug).&lt;br /&gt;
&lt;br /&gt;
The script that I used in my objects is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
vector center;&lt;br /&gt;
float distance = 15.0;&lt;br /&gt;
&lt;br /&gt;
rez_marker(vector pos, vector normal)&lt;br /&gt;
{&lt;br /&gt;
    llRezObject(&amp;quot;Marker&amp;quot;, pos, ZERO_VECTOR, llRotBetween(&amp;lt;0,0,1&amp;gt;, normal), 0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
probe(vector direction)&lt;br /&gt;
{&lt;br /&gt;
    //llSay(0, &amp;quot;direction = &amp;quot; + (string)direction);&lt;br /&gt;
    vector start = center + llVecNorm(direction) * distance;&lt;br /&gt;
    list results = llCastRay(start, center, RC_REJECT_AGENTS|RC_REJECT_PHYSICAL|RC_REJECT_LAND, RC_GET_NORMAL);&lt;br /&gt;
    if (llList2Integer(results, -1) &amp;gt; 0)&lt;br /&gt;
    {&lt;br /&gt;
        //llSay(0, &amp;quot;llCastRay returned &amp;quot; + (string)results);&lt;br /&gt;
        vector pos = llList2Vector(results, 1);&lt;br /&gt;
        vector normal = llList2Vector(results, 2);&lt;br /&gt;
        rez_marker(pos, normal);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;llCastRay FAILED!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    //rez_marker(start);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
init()&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        init();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    on_rez(integer param)&lt;br /&gt;
    {&lt;br /&gt;
        init();&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        if (llDetectedKey(0) != llGetOwner())&lt;br /&gt;
            return;&lt;br /&gt;
&lt;br /&gt;
        center = llGetPos();&lt;br /&gt;
        vector direction = &amp;lt;1,0,0&amp;gt;;&lt;br /&gt;
        float alpha;&lt;br /&gt;
        for (alpha = 0.0; alpha &amp;lt; 360.0; alpha += 10)&lt;br /&gt;
        {&lt;br /&gt;
            vector eul = &amp;lt;0, 0, alpha * DEG_TO_RAD&amp;gt;;&lt;br /&gt;
            rotation quad = llEuler2Rot(eul);&lt;br /&gt;
            probe(direction * quad);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put it in an object together with an object named &amp;quot;Marker&amp;quot;.&lt;br /&gt;
The Marker object should be a (red) sphere of size 0.1 x 0.1 x 0.01.&lt;br /&gt;
&lt;br /&gt;
The script will rez the Marker object on the surface of the&lt;br /&gt;
object you put it in, with it&#039;s flat side outwards.  If you test&lt;br /&gt;
this with a cube of 10x10x10 you&#039;ll understand what is the idea :p.&lt;br /&gt;
&lt;br /&gt;
Next test it with a Cylinder of size 3.4 x 4 x 3.342&lt;br /&gt;
Taper X and Y both 1.00, Top Shear X = 0.30, and Y = 0.0&lt;br /&gt;
(the rest default)... and see the deviations.&lt;br /&gt;
&lt;br /&gt;
Try many more funny shaped objects to see loads and loads of&lt;br /&gt;
bugs and inaccuracies.&lt;br /&gt;
&lt;br /&gt;
--[[User:Aleric Inglewood|Aleric Inglewood]] 0:55, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
You know, part of me hopes you&#039;re right--and that there&#039;s nothing I can do about it. Shapes like you&#039;re describing are terrible for the physics engine (tons of triangles, some of the degenerate, etc.). That said, I&#039;ll take a look at the physics debugger we have and see what&#039;s going on tomorrow. I suspect that the physics representation just isn&#039;t quite what you think it is. We&#039;ll see. Either way, thanks for bringing it to my attention.&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 03:41, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:As Teleworm points out below, the problem here is in your script, not in the llCastRay. You should check the hit list to find the hit with the UUID matching the scripted object&#039;s key and use that. You may still get more than one hit if you&#039;re near the edge of a triangle or if your shape is not convex, however.&lt;br /&gt;
:[[User:Falcon Linden|Falcon Linden]] 04:07, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Simple Raytracer==&lt;br /&gt;
&lt;br /&gt;
[[File:Snapshot_2983.png|left|256px]]&lt;br /&gt;
I did this a few days ago, it&#039;s pretty nifty!&lt;br /&gt;
&lt;br /&gt;
--[[User:Moy Loon|Moy Loon]]&lt;br /&gt;
&lt;br /&gt;
Not just nifty, bloody awesome! Btw, notice the way the two thin cylinders show as boxes. We replace long, thin cylinders with boxes. Can you take a photo with an avatar? :)&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 04:09, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[File:Avmeshforms.png|256px]]&lt;br /&gt;
&lt;br /&gt;
== Visualizing rays for debugging? ==&lt;br /&gt;
&lt;br /&gt;
Would it be possible to have the server send to the client the exact position of the begin and end points of the ray (so the client can render the ray itself) to help with debugging? (like trying to figure out ray positioning for a complex shaped linkset that needs close rays) I imagine it would be somthing like, the client tells the server it wants the rays, then the server will send the info for all rays owned by the avatar, and the client will render them as beacon like lines that fade gradually (the fading time would be a debug setting), perhaps add a bit of animation tot he beam like those pulses for the &amp;quot;cheesy beacon&amp;quot; for TP targets and tracking people on the map, to indicate the direction of the ray. To cope with packet loss, each time the client receives ray data it will tell the server whether to continue or stop, or perhaps just keep sending the request every N seconds and if the server don&#039;t get a request for a few N seconds it stops sending the info to that client. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 16:59, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I wish. Sorry, that&#039;s out of the scope of this project (which is intended to require a minimum amount of development time. So far, I think I&#039;ve spent &amp;lt;10hrs coding it, and I&#039;m trying to keep it under 20 total. &lt;br /&gt;
:[[User:Falcon Linden|Falcon Linden]] 04:20, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You could also just rez an object to &#039;visualize&#039; it, learn about llRotBetween, and how to split things up into 10m chunks! --moyloon&lt;br /&gt;
&lt;br /&gt;
== Edge of sim returning usefull results ==&lt;br /&gt;
&lt;br /&gt;
How about if when the ray hits the edge of the sim, position will be the intersection of the ray with the edge (since it can&#039;t go past it), and the UUID will be one constant if there is another sim on the other side of the edge, and another constant if it leads into the void? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 20:02, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Sorry, that&#039;s just a little too hacky and out of scope for this one. :) Would be interesting, though! Feel free to submit a jira for interrogating the region as to its neighboring sims. That might be a useful function.&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 04:11, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Phantom getting hit? ==&lt;br /&gt;
&lt;br /&gt;
Could anyone confirm if phantom objects are really not being ignored please? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 23:18, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Yes, this is a bug that I will fix when I have time. Shouldn&#039;t be too hard.&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 04:11, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Even flexies are getting hit, but the the normals seem to be messed up (in my preliminary tests it seems the normals returned for flexies all point up regardless of where you hit them) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:29, 8 July 2010 (UTC)&lt;br /&gt;
:: Flexies attached to phys linksets seem to be harder to hit (they also got a funky collision but just with the ground apparently, nothing but lucky rays and the ground seems to collide with them, i&#039;m not 100% sure, but i think in H4 not even the ground touches physical flexies) --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 05:44, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Not hugely surprising, if phantom is getting picked up. Flexies don&#039;t have a flexible physics rep, I think it&#039;s just a box or something. I&#039;ll have to look into it, but probably not before next week. Curious, though, what about trees? (Note that a tree&#039;s physics shape is a very narrow box, so you&#039;d have to cast right in the middle of the tree.)&lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 05:36, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Haha, whoops. I looked at my code and it&#039;s a one line bug. I could fix it now, but it&#039;s not critical and it wouldn&#039;t get updated on Aditi for a few days anyway. But rest assured, it should be a quick and easy one. :)&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 05:49, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Would it be possible to add a checkbox or a setting that scripts can set to keep flexies colliding with the ground when desired? I&#039;ve jsut made a random toy that it&#039;s kinda fun to watch that without flexies colliding with ground but nothing else wouldn&#039;t work quite the same (i&#039;m asking for a somthign liek a checkbox/hidden switch because i can imagine that if this behavior isn&#039;t present in H4 some stuff might break if it&#039;s kept). No biggie if it has to be fixed though. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 07:04, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:::This reminds me of one existing (Agni) edge case that might be useful to clear up with this.  Currently if an avatar sits on an object, and that object then sets VolumeDetect to TRUE, the physics engine sets the avatar to phantom, and it does not register any hits on the avatar, even to the point of rendering the avatar invulnerable with regards to LL Damage.  I had not thought to test this with RayCasting, but I am wondering what the intended effect will be in terms of how rays will interact with these phantom avatars.  For additional information, see [http://jira.secondlife.com/browse/SVC-1253 SVC-1253] which has sort of lingered in limbo, probably because there are more important things to fix.  However, if the raycasting code is still being written, it&#039;d be nice to prevent this sort of unintended behavior before it even begins.&lt;br /&gt;
:::[[User:Jahar Aabye|Jahar Aabye]] 03:27, 9 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:::The sitting-phantom glitch with llVolumeDetect already has some odd behaviors, if you enable physics on the linkset.  When physical, the avatars behave something like tiny points of solid material, snagging on objects that the linkset passes through.  It&#039;s very odd.  I suppose I should bring some example code around and shoot rays at it, an&#039; see what happens?&lt;br /&gt;
:::--[[User:Michelle Resistance|Michelle Resistance]] 16:19, 13 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Some good news for llCastRay ==&lt;br /&gt;
&lt;br /&gt;
I was playing with the script from Aleric Inglewood and tried to figure out what causes this strange inaccurate positions and normals. And I figured out that the main reason is the Marker size and shape and not the physic engine. &lt;br /&gt;
&lt;br /&gt;
In the example of Cylinder of size 3.4 x 4 x 3.342, the ray hits a Marker which was previously rezed one step before and not the surface of the cylinder. That is the reason, why were Normals wrong oriented. I modify the script in such a way that I numbered all Markers with llSetText.&lt;br /&gt;
&lt;br /&gt;
The second problem is inaccurate position. A marker is always placed about 3-5 cm &#039;&#039;&#039;above&#039;&#039;&#039; a surface, and not exactly on it on a flat surface. This can be seen on a cube object. On a sphere, this error is smaller. And in a shape of this deformed cylinder sometimes markers appears below surface and becomes invisible, but never more than 5cm.&lt;br /&gt;
&lt;br /&gt;
To correct the Aleric experiment, just make a smaller marker. And when all markers are rezed, resize the cylinder to become little smaller to see all markers. If you zoom with your camera very close, you can see that all markers follow the orientation of polygones that define the object shape.&lt;br /&gt;
&lt;br /&gt;
--[[User:Teleworm Gelber|Teleworm Gelber]] 23:40, 7 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Good catch. I came to the same conclusion about Aleric&#039;s script, but I cheated (I have a way of visualizing the raycasts and the whole physics scene :). &lt;br /&gt;
&lt;br /&gt;
As for the inaccurate position, it&#039;s not inaccurate per se. It&#039;s just not what you expect. Most shapes in the physics engine (anything that isn&#039;t a perfect cylinder or perfect sphere, as I recall) has an additional radius of 5 or 10cm (I can never remember which). This is why if you stack physical boxes they&#039;ll have a gap between them. We use raycasts for sitting, but we specifically account for the radius in that code and in a few other places (like foot IK). There are a few other idiosyncracies around raycast results. For example, for most shape a ray parallel to its surface will not return a hit, nor will a ray terminating exactly at its surface or a ray originating inside the shape (unless it&#039;s a concave shape made of triangles, in which case the same holds true, but it&#039;s the individual triangle the ray begins inside that won&#039;t be hit). &lt;br /&gt;
&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 04:18, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Can we have this on the maingrid pretty please? ==&lt;br /&gt;
&lt;br /&gt;
I know this is experimental etc, but would it be possible to port the ray code to a sim version avaible on the maingrid and offer a sandbox sim with this hybrid version so we can play with ray with our main invs, live groups, chatting with friends inworld etc? --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 00:19, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Sorry, no. We&#039;re not set up for doing that sort of thing. We can bring your agni inventory over to Aditi (contact Oskar), but you&#039;ll lose anything you currently have on Aditi.&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 04:21, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I know, the beta grid inventory is one way copy of the main grid inv, everything gets overwritten when it&#039;s refreshed; i would rather not have to keep exporting the stuff i make there when i want to keep them though. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 07:09, 8 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Just saying TY ==&lt;br /&gt;
&lt;br /&gt;
TY ;-) Will be cool. Keep it up Falcon.&lt;br /&gt;
&lt;br /&gt;
== just letting you know ==&lt;br /&gt;
&lt;br /&gt;
I&#039;ll be out of town this week, won&#039;t be able to read the stuff here nor log in to test stuff, cya. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 20:57, 10 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Cast Ray vs. Ray Cast ==&lt;br /&gt;
&lt;br /&gt;
The function name proposed is &amp;quot;llCastRay&amp;quot; but the constants start &amp;quot;RC&amp;quot; as in &amp;quot;Ray Cast&amp;quot;. Would make sense to have them be consistent (as in &amp;quot;CR&amp;quot;). It&#039;s annoying keeping [[llMessageLinked]] and [[link_message]] straight. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 16:40, 15 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I second that motion. I&#039;m hoping this functionality is introduced and however it comes will be better than not coming at all but, while the opportunity exists to craft it to be as clean and user friendly as possible, that opportunity should be taken. Although this seems like a tiny issue (link_message vs llMessageLinked OR llSetLinkPrimitiveParamsFast *fingers gasp for breath* (although at least it wasn&#039;t llSetLinkPrimitiveParametersFast)) there is no good argument in favor of making function or event names insensible whereas there are good arguments in favor of them being simple and easy to write and remember. Now is the time to get that right. Still hugely in favor of the functionality though so if you MUST call it something complex and irritating, go right ahead ;-) -- &#039;&#039;&#039;[[User:Fred_Gandt|Fred Gandt]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Fred_Gandt|talk]]|[[Special:Contributions/Fred_Gandt|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 07:13, 17 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
The logic is that the method, llCastRay, is a verb phrase (&amp;quot;cast a ray&amp;quot;), whereas the parameters are noun/adjective phrases (&amp;quot;Ray Cast Reject Agents&amp;quot;, &amp;quot;Ray Cast Reject Terrain&amp;quot;). Does that make sense to you?&lt;br /&gt;
[[User:Falcon Linden|Falcon Linden]] 06:39, 19 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Hey Falcon :-)&lt;br /&gt;
&lt;br /&gt;
:Grammatically correct it may be but, fiddly. Muscle memory etc. llCastRay(CR_summit_summit) just flows better. It&#039;s really only the _summit_summit that matters at the end of the day. If there were flags that were &#039;&#039;BOTH&#039;&#039; RC_ &#039;&#039;AND&#039;&#039; CR_ (depending on grammatical doobrywotsits) then cool; but, if there will only be &#039;&#039;EITHER&#039;&#039; CR_ &#039;&#039;OR&#039;&#039; RC_ I for one would prefer to go along with the CR_ simply so I don&#039;t need to think about my old English teachers in the middle of writing a statement. *not terribly concerned but, interested* -- &#039;&#039;&#039;[[User:Fred_Gandt|Fred Gandt]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Fred_Gandt|talk]]|[[Special:Contributions/Fred_Gandt|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 10:35, 19 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I like the gramaticly correct approach, saves time when reading a script, and once you get used to it it flows as smoothly as anything else. It somtimes brings a smile to my face when i realise what i&#039;m writting makes sense even if i didn&#039;t understand what the words make happen under the hood. And the more consistent LSL is the better,  it already goes the gramaticly correct route elsewhere, so it would be expected it would also do it here. --[[User:TigroSpottystripes Katsu|TigroSpottystripes Katsu]] 20:48, 19 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Tigro...An example of LSL being grammatically correct elsewhere would be, what? Perhaps the well known functions llGiveFolderOfInventoryListed or llSendMessageToLinkInSet?&lt;br /&gt;
::::Falcon (since I&#039;m already here)...I was thinking that since the world at large (when thinking about ray-casting) thinks of Ray-Casting rather than Casting-Rays it would prolly be even simpler to name the function llRayCast. *shrugs* TBH, whatever the parts end up being called it&#039;s how they work that matters most. Awesome of you to be trying to get this out. Hear&#039;s (now) quietly hoping. -- &#039;&#039;&#039;[[User:Fred_Gandt|Fred Gandt]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Fred_Gandt|talk]]|[[Special:Contributions/Fred_Gandt|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 04:02, 20 July 2010 (UTC)&lt;br /&gt;
::::: llMessageLinked isn&#039;t gramaticly correct?&lt;br /&gt;
&lt;br /&gt;
== ray_impact event vs. http ==&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been thinking about the asserted need for a ray_impact event to determine if you&#039;ve been hit by a raycast. Babbage suggested that instead of creating a new ray_impact event (which is trickier than any of us might like), the same goals could be accomplished using the existing HTTP url system. The idea was that you&#039;d set up a system as follows for securely communicating the results of the ray cast:&lt;br /&gt;
&lt;br /&gt;
1) Users wear a hit detection script that acquires an HTTP-in URL and stores it in its description. &lt;br /&gt;
2) For weapons builders, you provide a copy, no-mod (and thus unreadable) script (call it a &amp;quot;firing script&amp;quot;) that has a link_message event that the weapon builders&#039; scripts can use to talk to it. This script also contains a secret key known to the hit detection scripts.&lt;br /&gt;
3) The weapon script sends a link message to the firing script with the requested start/end position of the ray. The firing script (which is secure because it was written by the system creator) then casts a ray (if the start/end points are allowed based on game rules). If it detects a hit, it gets the target&#039;s hit detection url from the target&#039;s description and sends an HTTP POST with the details, including a secret code to verify authenticity.&lt;br /&gt;
&lt;br /&gt;
What would prevent this from being a viable alternative to a ray_impact event? (Obviously, it generalizes to other uses equally well.)&lt;br /&gt;
If you think it will be too slow or have another fault, could you code up a simple, testable example?&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
&lt;br /&gt;
:Something similar could be done using llRegionSay by sending the message on a frequently changing, random channel. The synchronization on channel would be performed by llRegionSay&#039;ing a new random channel number periodically, with the number encrypted using a key shared by all interested/authorized scripts. This would seem a lot simpler/faster than the HTTP idea.&lt;br /&gt;
&lt;br /&gt;
::I think a ray_impact would be a useful event, but by no means necessary.  There&#039;s any number of ways to securely communicate script to script using chat, http, reading one another&#039;s descriptions, carrier pigeon, etc., with llSHA1String or llMD5String and a password providing authentication.  If ray_impact is any trouble, drop the idea; don&#039;t let it stand in the way of getting us llCastRay.  It would be simpler to update existing combat meters using a new event, I think, but I don&#039;t think that should be a barrier.  [[User:Jack Abraham|Jack Abraham]] 07:23, 22 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Change Reject constants to be inclusive ==&lt;br /&gt;
Many, if not all other, LL calls use constants OR&#039;d together in a positive sense to change a scripts&#039; behavior.&lt;br /&gt;
This is the only function where I have seen constants used to reduce what the function does.&lt;br /&gt;
&lt;br /&gt;
I&#039;d suggest changing the RC_REJECT constants by eliminating the _REJECT_ portion and also adding a new constant, something along the lines of RC_ALL.&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;normal&amp;quot; call would have the ALL constant unless you only wanted a subset of actions, in which case your OR together the constants you need.&lt;br /&gt;
&lt;br /&gt;
What do people think?  [[User:Jonathan Yap|Jonathan Yap]] 10:01am, 24 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Although unusual (this is just my opinion) rejection rather than inclusion seems like a perfectly reasonable way around things. I wonder if it might be more efficient too. Analogy: Compact discs: When a CD has bonus tracks that are often disruptive when listening to an otherwise complete listening experience, it is typical to avoid being disturbed after the album is finished that we need to &#039;&#039;include&#039;&#039; all the album tracks in a programmed playlist before starting the playback. I have often wished that I could &#039;&#039;exclude&#039;&#039; the few bonus tracks instead. I would go so far as suggesting that bonus tracks should be (in what seems an illogical fashion) the first tracks indexed on the CD so that no playlist programming is required at all; We simply start playback at track 4 to avoid playing the 3 bonus tracks. So although unusual and unexpected, an alternative way might be more efficient and simpler to use.&lt;br /&gt;
::This however is not a compact disc so, my greatest concern is with how well it works and how efficient it is as code. If there is NO difference in efficiency at all between rejection and inclusion, for the sake of continuity I would certainly agree with [[User:Jonathan Yap|Jonathan]] insofar that the &#039;&#039;normal&#039;&#039; way to construct a function by &#039;&#039;inclusive&#039;&#039; constants would be preferable. -- &#039;&#039;&#039;[[User:Fred_Gandt|Fred Gandt]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Fred_Gandt|talk]]|[[Special:Contributions/Fred_Gandt|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 08:26, 25 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Optimizing Simulations ==&lt;br /&gt;
&lt;br /&gt;
Well, I got quite a few ideas that surround this issue, and I have tried to narrow it doesn&#039;t to a simple concept that describes a pattern how to use functionality, like llCastRay(), to optimization simulations. I blogged more details here: [http://icyspherical.blogspot.com/2010/07/optimizing-simulations-with-basic.html Icesphere Blog]. Let&#039;s not confuse this with a common ray-tracer. I want the client end to contact a prim on the simulator to demonstrate the basic pattern. The prim just needs to cast rays and send data back to the client. The client-side fills in the details. This first phase would only need to get a rough scene layout. Close objects probably can be gathered with a scanner and some further objects can be done with llCastRay() (can&#039;t cross sims yet, but someday maybe). Hopefully, use http client/server methods to communicate with detected objects.&lt;br /&gt;
&lt;br /&gt;
Now with that basics above, scripts added into detected objects could further describe details of the scene through client/server methods. I&#039;ve seen other LSL raytracers, that didn&#039;t use llCastRay(), that used scripts to store &amp;quot;material&amp;quot; data and thought... cool!&lt;br /&gt;
&lt;br /&gt;
Posted some vulgar code here: [[User:Dzonatas_Sol/HttpCastRayLLSD]] [[User:Dzonatas Sol|Dzonatas Sol]] 05:52, 28 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Possibility of a &amp;quot;Fast&amp;quot; trace ==&lt;br /&gt;
&lt;br /&gt;
Hi Falcon.&lt;br /&gt;
&lt;br /&gt;
ty ty ty ty ty ty :D (Now that I got that off my chest :p)&lt;br /&gt;
&lt;br /&gt;
I&#039;ve got a bit of a suggestion, is it possible to add a llCastRayFast which only determines if there is something within the filter that&#039;s in the way between point A and point B.&lt;br /&gt;
&lt;br /&gt;
E.g. xyz avatar wants to go to sleep but a requirement to goto sleep in a hud is that the avatar is sheltered from the elements, the script does a trace looking to see if the avatar has a clear shot at the sky or not, if not the avatar is under cover.&lt;br /&gt;
&lt;br /&gt;
I really hope the hands of god (LL) allow this to make it into the maingrid.&lt;br /&gt;
&lt;br /&gt;
Look forward to catching you on the test grid :)&lt;br /&gt;
&lt;br /&gt;
Cheers,&lt;br /&gt;
Lastro&lt;/div&gt;</summary>
		<author><name>Lastro Greenwood</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Mono&amp;diff=948252</id>
		<title>Mono</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Mono&amp;diff=948252"/>
		<updated>2010-06-26T02:06:39Z</updated>

		<summary type="html">&lt;p&gt;Lastro Greenwood: /* How LSL scripts work */ corrected typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Help |Glossary=*}}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;right&amp;quot; style=&amp;quot;text-align: center&amp;quot; width=&amp;quot;375&amp;quot;&lt;br /&gt;
| &amp;lt;videoflash&amp;gt;cGoM9p7q1jk&amp;lt;/videoflash&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;[http://vidtuts.s3.amazonaws.com/Understanding-Mono.mp4 DOWNLOAD this video in high-quality!]&#039;&#039;&#039; and&amp;lt;br /&amp;gt; &#039;&#039;&#039;[[Mono_demos|watch more videos of Mono in action]]&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;quot;Mono for Second Life&amp;quot; refers to a simulator upgrade which can dramatically speed the running of scripts — especially calculation intensive ones.&#039;&#039;&#039; The Linden Scripting Language ( [[LSL Portal | LSL]] ) has not changed in any way&amp;lt;span class=&amp;quot;TablePager_nav&amp;quot;&amp;gt;[[#FAQ-Differences|*]]&amp;lt;/span&amp;gt;, so all of your existing scripted objects and attachments continue to function as before, only now they will have the opportunity to run faster. The key to this improvement is an open-sourced scripting engine called [http://www.mono-project.com/Main_Page Mono]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mono is now live on the main grid with server version 1.24.3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== How LSL scripts work ==&lt;br /&gt;
&lt;br /&gt;
Linden Lab server programs, known as &#039;&#039;simulators&#039;&#039; or &#039;&#039;sims&#039;&#039;, run all LSL scripts.  When you teleport, or region cross, your new region&#039;s sim takes on the task of running all your scripted attachments. But a sim cannot understand LSL directly -- the language was designed for human readability, not machine. So before the script can be executed, it must be turned into a machine readable format. This process is called &#039;&#039;compilation&#039;&#039;, and the resulting machine-readable version of the script is called &#039;&#039;bytecode&#039;&#039;. LSL scripts are compiled when they are created by resident-programmers. The bytecode itself is stored on the Linden Lab asset servers and never needs to be referred to directly by residents. Instead, when you rez a scripted object, the simulator for the region you are in notes the script(s) in the object, and requests the appropriate bytecode from the asset database. The simulator program has several parts, and the part which runs the script bytecode is called the LSL scripting engine or virtual machine. &lt;br /&gt;
&lt;br /&gt;
In today&#039;s Second Life, scripts are everywhere: from simple rotating objects to complicated vehicles, vendors, or attachments that respond to chat commands. For many regions the scripting engine is kept busy trying to execute hundreds of scripts all at once. As the number and complexity of scripts in a region rises, so do the demands upon the simulator. After a certain point the scripting engine starts taking up so much processing time that the rest of the simulator (particularly the physics engine) bogs down, resulting in server-side lag. Thus, anything that can speed up the execution of scripts can push out the point where server lag starts to occur.&lt;br /&gt;
&lt;br /&gt;
=== Enter Mono ===&lt;br /&gt;
Mono is an open-source scripting engine with a proven record of speed and versatility.  But switching engines requires a compiler that can turn LSL scripts into Mono bytecode. This is tricky, because the goal is to make scripts running under Mono behave exactly like scripts running under the original engine. This desire for  backward compatibility required an extraordinary amount of testing.&lt;br /&gt;
&lt;br /&gt;
== Mono on the main grid ==&lt;br /&gt;
Thanks to the efforts of the beta test residents, and the Linden development and QA teams, Mono was deployed to the main grid in [[Release_Notes/Second_Life_Server/1.24#Release_Notes_for_Second_Life_Server_1.24.3_.28August_29th.2C_2008.29:| server version 1.24]] on 29 August 2008.  &lt;br /&gt;
&lt;br /&gt;
The Mono Viewer changes were first available in the 1.21 client, and are now present in all [http://secondlife.com/corporate/tpv.php allowed] SL viewers. The viewer changes include a checkbox on the script edit dialog (which allows you to make a script compile to Mono), a Tools menu item to allow you to recompile to Mono all the scripts in your selection, and a change to simulator statistics to show events per second instead of instructions per second. &lt;br /&gt;
&lt;br /&gt;
Another viewer dependency concerns the &amp;quot;Script perf&amp;quot; line in the statistics bar (ctrl-shft-1). In older viewers (1.20 and lower) this line will no longer contain useful data. In 1.21 and later viewers this line becomes &amp;quot;Script events&amp;quot; and gives the number of events handled per second.  &lt;br /&gt;
&lt;br /&gt;
Once Mono has been live on the main grid for several months Linden Lab may turn off compilation to the original scripting engine. At that point all new and edited scripts will be Mono. However, the servers will also maintain the original scripting engine to enable old scripts to run as before, but run as Mono as soon as they are edited.&lt;br /&gt;
&lt;br /&gt;
== Mono benefits ==&lt;br /&gt;
Performance benchmark tests show that Mono is up to 220 times faster than LSL2. The benchmarks were math-intensive scripts typically used to evaluate performance. For ordinary scripts, the performance gains are much more humble. &lt;br /&gt;
&lt;br /&gt;
Mono uses more memory than the typical LSL bytecode. It offsets this by introducing dynamic memory allocation.  LSL2 allocates a full 16KB for all scripts, even simple &amp;quot;Hello, Avatar&amp;quot; ones.  Mono allocates only the memory it needs. In tests on typical regions it turns out that the combination of Mono using more memory, but allocating memory better, is about a wash as far as overall memory footprint goes. &lt;br /&gt;
&lt;br /&gt;
In some extreme cases Mono scripts can use up to four times the memory as LSL2 scripts. To maintain backwards compatibility, the script size limit has been increased from 16KB to 64KB.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mono tip:&#039;&#039;&#039;&lt;br /&gt;
Mono can do bytecode sharing. Thus multiple copies of scripts with the same asset id will only take up as much room as one instance. Imagine some script that you use a dozen times on your land. If each of the objects containing the script is separately compiled from text source, you will use up a dozen times the script&#039;s size of memory. But if instead you simply drag a copy of the single, already compiled script into each of the dozen objects, then no matter how many copies exist they only take up the size of one script (plus data) in memory.&lt;br /&gt;
&lt;br /&gt;
== How to use Mono ==&lt;br /&gt;
&lt;br /&gt;
Mono is now fully deployed to the main grid with server 1.24.3. All allowed SL viewers have the interface to create Mono scripts. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Log in to Second Life with a Release or Release Candidate viewer&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Create/edit a script and compile it to Mono&#039;&#039;&#039;&lt;br /&gt;
** Create an object and add a new script to it&lt;br /&gt;
** Edit the script from the object&#039;s contents tab.&lt;br /&gt;
** On the script editing dialog you will see a new checkbox at the bottom &amp;quot;Mono&amp;quot;. Check it.&lt;br /&gt;
** Hit Save to recompile this script to Mono.&lt;br /&gt;
** You may now treat this script like any other. It will automatically run in the Mono runtime, regardless of ownership transfers or viewer version.&lt;br /&gt;
** To convert a Mono script back to ordinary LSL2, uncheck the checkbox.&lt;br /&gt;
* &#039;&#039;&#039;To convert a number of scripted objects all to Mono at once&#039;&#039;&#039;&lt;br /&gt;
** Rez all the scripted objects&lt;br /&gt;
** Use the select tool to select them all.&lt;br /&gt;
** From the Tools menu select Recompile Selection / Mono.&lt;br /&gt;
&lt;br /&gt;
After you have converted a scripted object to Mono you will need to do a full QA run. Though Mono is compatible with old LSL2, there are timing differences which may cause object behavioral changes. Test your objects thoroughly before releasing Mono versions. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;To report Mono issues, use JIRA&#039;&#039;&#039;&lt;br /&gt;
* Public JIRA [https://jira.secondlife.com/secure/CreateIssue!default.jspa create issue]&lt;br /&gt;
* If an issue already exists, and it appears to be the same failure, then simply add your information as a comment and attachment to that issue.&lt;br /&gt;
* If not, open a new SVC ticket for each bug you find. In the ticket summary please use the word &amp;quot;Mono&amp;quot; so that we can filter for them. &lt;br /&gt;
* In addition to your description of the problem please attach your script itself, or (ideally) a smaller script which illustrates the difference in behavior between the two scripting engines.&lt;br /&gt;
* Link your JIRA to the meta JIRA.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
During the integration of Mono we have used tests to ensure there are no regressions. For the current version of the regression test see [[LSL Language Test]]. This effectively serves as the specification of LSL.&lt;br /&gt;
&lt;br /&gt;
There are tests for library call bindings in [[LSL Library Call Test 1]] and [[LSL Library Call Test 2]]. This is split to overcome the memory limitations.&lt;br /&gt;
&lt;br /&gt;
[[Event test script]]&lt;br /&gt;
&lt;br /&gt;
There are several benchmarks to test the performance. They are available here:&lt;br /&gt;
*[[LSL Recursion Benchmark]]&lt;br /&gt;
*[[LSL Mandelbrot Benchmark]]&lt;br /&gt;
*[[LSL Partial Sums Benchmark]]&lt;br /&gt;
*[[LSL NSieve Benchmark]]&lt;br /&gt;
*[[LSL NSieve Bits Benchmark]]&lt;br /&gt;
&lt;br /&gt;
== FAQs ==&lt;br /&gt;
Section for questions.&lt;br /&gt;
; Can you give a few examples scripts where Mono&#039;s speed increase is readily apparent? : These calculation intensive scripts run considerably faster under Mono: [[LSL_Recursion_Benchmark]], [[LSL_Mandelbrot_Benchmark]], [[LSL_Partial_Sums_Benchmark]],[[LSL_NSieve_Benchmark]], [[LSL_NSieve_Bits_Benchmark]].&lt;br /&gt;
; As far as previously purchased LSL scripts, why do I have to wait for the scripter to convert the script to run on Mono, why can’t I just do this myself? : The increase in speed provided by Mono can cause problems with objects using communication between multiple scripts and there are a few cases where we have had to make Mono behave slightly differently to LSL. It&#039;s much safer to have the original scripter convert and &#039;&#039;&#039;test&#039;&#039;&#039; the scripts.&lt;br /&gt;
; Will scripts compiled to Mono work on an older version of the viewer? : Yes. You only need a viewer version 1.21 or later if you want to make Mono scripts. You can run Mono scripts from any viewer since Mono actually runs on the server.&lt;br /&gt;
; Is there an indicator of some kind to tell me that a script is running on Mono? How can I tell? : No. It&#039;s very difficult to work out whether objects and all the objects they contain use Mono scripts, so we haven&#039;t attempted to display it. &lt;br /&gt;
; Given that OpenSim runs on Mono, will LL implementing Mono expedite interoperability between the two worlds? : We are talking to OpenSim developers about script interoperability based on Mono.&lt;br /&gt;
; Has the available memory for scripts changed? (Currently 16k in LSL2 VM) : For the same LSL script the Mono bytecode and original (LSL2) bytecode will be of different size. In order to be compatible with all known scripts, we have expanded the size ceiling for Mono to be 64k. This is ok to do for Mono because unlike LSL2, Mono allocates memory dynamically, whereas all LSL2 scripts occupy 16K. Mono scripts only allocate the memory that they need.&lt;br /&gt;
; 64K? Wow, isn&#039;t that going to encourage inefficient scripting? : We hope that the change will promote more efficient scripting. Currently programmers have to get around the 16K limit by using multiple scripts, and a lot of cycles get spent on passing data between those scripts. With a single script that would not be necessary. &lt;br /&gt;
; Are there other ways to make my scripts even more memory efficient when using Mono? ;  : Indeed, Mono can do what&#039;s called bytecode sharing. Suppose you have a region which uses many instances of the same script, like XYText or Puppeteer, for example. As long as all the instances share the same asset id, the bytecode will only be added to memory once, and shared by all the copies. Key to making this work is ensuring that you simply copy the scripts (or the objects the scripts are within) after they have been saved for the final time. If you have purchased a script that is used many times, ask the creator for a Mono version, and then copy that version into the objects. It&#039;s important that you copy the scripts, so that the asset id is the same. If you recompile each instance separately, they will get different asset ids and the engine won&#039;t be able to share the bytecode. &lt;br /&gt;
; Will I have to manually convert all my objects to using Mono, or is there an automated tool? : Yes, you must manually invoke compilation to Mono. Though you can make use of the Tools Menu to recompile all scripts in selection to Mono. &lt;br /&gt;
; Can I keep my scripts running on the original scripting engine forever? : We have no plans to eliminate the original engine. This will be re-examined after Mono has been live on the Main Grid for a while. But right now it is easier to continue to support the original scripting engine than to migrate all scripts. &lt;br /&gt;
; Will I be able to write scripts in languages besides LSL since Mono supports lots of languages? : Eventually. Right now our goal is to make Mono completely compatible with the original scripting engine for LSL scripts.  &lt;br /&gt;
; Will LSL be getting real language features with this change? (ie arrays, references/pointers, includes/imports)&lt;br /&gt;
: No.  The LSL language is not changing with this update.&lt;br /&gt;
; In the original scripting engine scripts are compiled on the viewer then uploaded, will that change with Mono? : Yes, Mono compilation is done in a distributed fashion on the sim hosts. &lt;br /&gt;
; Related to the above, I use a &amp;quot;clever trick&amp;quot; to upload my compiled bytecode in LSL2 with out the correct script text. What will happen to scripts I uploaded in this way when converted to Mono? Will I be able to continue to use my &amp;quot;clever trick&amp;quot; for Mono scripts? : The Mono compiler looks only at the script text. The Mono engine will only run bytecode which has been compiled by our Mono compiler. You will not be able to run any uploaded Mono bytecode.&lt;br /&gt;
; What about &#039;&#039;bytecode&#039;&#039; scripts whose &#039;&#039;LSL code&#039;&#039; has been lost, ie scripts that still run, but result in &amp;quot;Script missing from database.&amp;quot; when you try to edit them?  Is there any possibility of bytecode translation, or are these scripts stuck in the original scripting engine forever?&lt;br /&gt;
: There are currently no plans to allow byte code translation of LSL scripts, only compiling from source. This may be considered depending on Resident demand.&lt;br /&gt;
; &amp;lt;span id=&amp;quot;FAQ-Differences&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;What are the known differences between the LSL2 and Mono compilers and runtimes?&lt;br /&gt;
: We have not tried to make Mono 100% compatible with the original engine. At least not to the point of duplicating any of the tricks or hacks that LSL2 allowed. Below are listed some known behavioral differences. Add to the list as more are discovered.&lt;br /&gt;
:* Unicode support. From Strife Onizuka &amp;quot;In LSO LSL, the entire Unicode range was supported by complying to RFC 2279 (about 2 billion possible characters). Mono supports RFC 3629 which supplants RFC 2279 and limits the Unicode range to the first 1,114,112 character codes. This directly effects these functions: [[llBase64ToString]], [[llUnescapeURL]]. Strings being passed from LSO scripts to Mono scripts will become corrupted (in a reliable way) if they contain characters outside the limited Unicode range.&amp;quot; -- {{Jira|SVC-1960}}&lt;br /&gt;
:* Dividing by zero - LSL2 errors on divide by zero, Mono uses value &amp;quot;Infinity&amp;quot; and does not error. &#039;&#039;Under server 1.30, this is an error under both environments, watch {{Jira|SVC-4805}} for updates.&#039;&#039;&lt;br /&gt;
; &amp;lt;span id=&amp;quot;FAQ-Recompile&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;After Mono launches why not recompile *all* scripts everywhere on the Grid to Mono?&lt;br /&gt;
: While it is certainly appealing to have only one compiler and runtime to support, practical concerns make this not feasible. Here&#039;s a list of the difficulties that give us pause:&lt;br /&gt;
:* We do not have the text asset (the LSL code) for all running scripts. These &amp;quot;bytecode only&amp;quot; scripts would stop working.&lt;br /&gt;
:* The automatic recompile would restart all scripts. Many scripts are meant to run continuously without restarting.&lt;br /&gt;
:* Mono scripts have a different timing profile than the original (usually faster). This will introduce behavior differences which will lead to some scripts breaking, often in subtle ways.&lt;br /&gt;
:* Some scripts take advantage of undocumented &amp;quot;features&amp;quot; of LSL2. We did not strive for 100% compatibility in such situations, but rather made Mono behave as sensibly and predictably as possible.&lt;br /&gt;
:* As a result of both reasons above, scripts need QA work after they have been recompiled. Residents who code and sell LSL scripts will have to test and possibly adjust the behavior of Mono versions of their scripts. If conversion were automatic they would not be reimbursed for their QA effort. With manual recompilation the Resident scripters can sell Mono versions of their scripts as an upgrade, after they have tested and modified them. &lt;br /&gt;
:* Recompiling all scripts would play rather heavy-handedly with the permissions system. If someone has made and sold a script as &amp;quot;no-modify&amp;quot;, an automatic recompilation would violate their policy. While some scripters would be ok with this, many would not.  &lt;br /&gt;
; Is Mono still available on the preview grid? : Yes, see [[Mono/Beta FAQ]].&lt;br /&gt;
&lt;br /&gt;
== Mono Memory Myths ==&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; The following has been commented on since by the OpenSim wiki - Miguel was testing an idle region without any background activity or users. It is not a representitive test. See more at [http://opensimulator.org/wiki/Mono]&lt;br /&gt;
&lt;br /&gt;
Experience with Mono in Opensim has led to the widespread belief that Mono on Linux is an extreme memory hog compared to .NET on MS Windows.  This belief has been countered by the creator of Mono, [http://en.wikipedia.org/wiki/Miguel_de_Icaza Miguel de Icaza], after he performed direct tests on 14th June 2009 in Vista 32, Linux 32, and Linux 64.  His results and advice were posted on [http://pastebin.ca/1460383 pastebin], and are repeated here since that site is not intended for persistent publication:&lt;br /&gt;
&lt;br /&gt;
 A third follow up.&lt;br /&gt;
 &lt;br /&gt;
 With the help from the guys on #opensim on irc.freenode.org I got myself a sample virtual world from:&lt;br /&gt;
 &lt;br /&gt;
 http://opensimworlds.com/index.php?part=worlds&lt;br /&gt;
 &lt;br /&gt;
 I used &amp;quot;Nu Athens&amp;quot; a free download and loaded it up on 3 configurations:&lt;br /&gt;
 &lt;br /&gt;
 Vista, running 32 bit OpenSim&lt;br /&gt;
 Linux, running 64 bit OpenSim&lt;br /&gt;
 Linux, running 32 bit OpenSim&lt;br /&gt;
 &lt;br /&gt;
 And then I loaded all the four files provided in the zip file using the command:&lt;br /&gt;
 &lt;br /&gt;
 load oar FILE.tar.gz&lt;br /&gt;
 &lt;br /&gt;
 The results are as follows:&lt;br /&gt;
 &lt;br /&gt;
 Vista/32: 115 megs + 5 meg helper process (OpenSim.vhost.exe)&lt;br /&gt;
 &lt;br /&gt;
 Mono/32: 92 megs, after a few minutes of inactivity, it goes down to 87 megs.&lt;br /&gt;
 &lt;br /&gt;
 Mono/64: 122 megs, after a few minutes of inactivity, it goes down to 89 megs.   &lt;br /&gt;
 &lt;br /&gt;
 The garbage collector is responsible for the difference in memory usage between the load finished&lt;br /&gt;
 and waiting (I ran into this problem because I came to measure again after a few seconds and the&lt;br /&gt;
 size had been reduced).&lt;br /&gt;
 &lt;br /&gt;
 The Vista system remains at 120 megs total for the same world.&lt;br /&gt;
 &lt;br /&gt;
 So Mono on Linux on both 32 and 64 bit configurations is consuming less memory than Vista, some&lt;br /&gt;
 40 megs out of 120, or one third less memory.&lt;br /&gt;
 &lt;br /&gt;
 Perhaps the difference is in the version of Mono that we are running.  I am running with Mono 2.4,&lt;br /&gt;
 and the OpenSim documentation implies that OpenSim can work with systems like Mono 1.2.6 which is&lt;br /&gt;
 primitive by our standards (that was released more than two years ago).&lt;br /&gt;
 &lt;br /&gt;
 In Mono 2.0, Mono 2.2 and Mono 2.4 we introduced many memory reduction features.   From using&lt;br /&gt;
 precise collection for the HEAP, to reducing the size of generics-heavy code to reduction in code&lt;br /&gt;
 size generated and runtime metadata tables.&lt;br /&gt;
 &lt;br /&gt;
 I would appreciate if you could post a correction to your data in the main article, as it seems to&lt;br /&gt;
 have spread and this could negatively impact the perception of the Mono&#039;s community work towards&lt;br /&gt;
 making a great .NET implementation for Unix.&lt;br /&gt;
 &lt;br /&gt;
 Miguel&lt;br /&gt;
&lt;br /&gt;
* PS. Miguel is measuring RSS (not VSIZE), for reasons explained [http://opensimulator.org/wiki/Talk:Mono in an earlier post].&lt;br /&gt;
&lt;br /&gt;
[[Category:Features]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Lastro Greenwood</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Lastro_Greenwood&amp;diff=945523</id>
		<title>User:Lastro Greenwood</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Lastro_Greenwood&amp;diff=945523"/>
		<updated>2010-06-22T10:25:58Z</updated>

		<summary type="html">&lt;p&gt;Lastro Greenwood: Created page with &amp;#039;== Lastro Greenwood&amp;#039;s Page == Hey everyone, I&amp;#039;m Lastro Greenwood.  I specialise in software development but can kinda build.&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Lastro Greenwood&#039;s Page ==&lt;br /&gt;
Hey everyone, I&#039;m Lastro Greenwood.&lt;br /&gt;
&lt;br /&gt;
I specialise in software development but can kinda build.&lt;/div&gt;</summary>
		<author><name>Lastro Greenwood</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol&amp;diff=945513</id>
		<title>LSL Protocol</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol&amp;diff=945513"/>
		<updated>2010-06-22T10:24:16Z</updated>

		<summary type="html">&lt;p&gt;Lastro Greenwood: /* Known chat channels */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header|ml=*}}&lt;br /&gt;
==Script protocols and known chat channels==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 0.5em 0.5em 1.5em&amp;quot;&amp;gt;&lt;br /&gt;
Some times, scripts in Second Life send messages to one another to exchange information or coordinate behavior.  The rules for that conversation are a &#039;&#039;protocol&#039;&#039;.  Being able to say &amp;quot;/1show&amp;quot; or &amp;quot;/1hug lee&amp;quot; are examples.&lt;br /&gt;
&lt;br /&gt;
Such protocols use a common [[chat channel]].  The examples above use channel 1.  They could just as easily have used any other number, but a user (and other objects) have to have some way to find the correct number.&lt;br /&gt;
&lt;br /&gt;
Some protocols, such as combat systems, are quite complicated and could be better documented.  This page can be used to help prevent conflicts and allow multiple programmers to coordinate the protocol definitions.&lt;br /&gt;
&lt;br /&gt;
Protocols can also be note card systems and systems that use object names.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Protocol list ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
Add a protocol here if it is widely used, or might be sometime in the future.&lt;br /&gt;
&lt;br /&gt;
A protocol in this list should also have its own pages where the protocol is defined in some detail.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| {{Prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Name&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Creator&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/Cool_Hud_Protocol|Cool Hud]]&lt;br /&gt;
|| {{User|Henri Beauchamp}}&lt;br /&gt;
|| Universal Hud protocol.&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/ListMessage|ListMessage]]&lt;br /&gt;
|| Anonymous&lt;br /&gt;
|| Send and receive lists, non-lists, non-results, verb-not-found, and partially evaluated Polish expressions.&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/LockMeister System|LockMeister System]]&lt;br /&gt;
|| Kyrah Abattoir&lt;br /&gt;
|| Used to coordinate different parts of bondage toys.&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/EasyTalk]]&lt;br /&gt;
|| Salahzar Stenvaag&lt;br /&gt;
|| |Very Easy and simple communication protocol. Use it to simply coordinate llSay/llRegionSay/llListen objects, as well as linked set&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/RestrainedLoveAPI|RestrainedLove viewer API]]&lt;br /&gt;
|| Marine Kelley&lt;br /&gt;
|| Use the features of the RestrainedLove viewer through llOwnerSay() calls.&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/Restrained Love Relay Specs|RestrainedLove viewer relay spec]]&lt;br /&gt;
|| Marine Kelley&lt;br /&gt;
|| Allow your furniture or cages to issue commands to the user&#039;s RestrainedLove viewer&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/Restrained Life Open Relay Group|RestrainedLove viewer open relay spec]]&lt;br /&gt;
|| Open Relay Group&lt;br /&gt;
|| A superset of the RestrainedLife viewer relay spec with useful extensions created and maintained by the community.&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/P Vendor Linked Messages API &amp;amp; Environment|P Vendor Linked Messages API &amp;amp; Environment]]&lt;br /&gt;
|| Zep Palen&lt;br /&gt;
|| Allows an owner of the P Vendor system to develope custom vendors and use the API for input/output&lt;br /&gt;
|-&lt;br /&gt;
|| [[User:Nexii_Malthus/Script_API|Script API]]&lt;br /&gt;
|| Nexii Malthus&lt;br /&gt;
|| A protocol to provide a useful communication layer between LSL scripts and supported clients, as well as a useful and purposeful feature set. (Vertical Life and Plywood clients currently)&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/Ganymedia OpenMAIP v1.0 Specification|OpenMAIP]]&lt;br /&gt;
|| Ganymede Ceriaptrix&lt;br /&gt;
|| &#039;&#039;Note: Specification is presently incomplete.&#039;&#039; Ganymedia OpenMAIP (Metaverse Application Internetworking Protocol) provides a TCP/IP-like routing and service-oriented message exchange protocol across multiple transport methods (including cross-simulator and cross-grid); allowing scripts to advertise their available functions, and relevant commands, to external and/or third-party scripts and viewers. Controlled access to closed functions is provided via RC4 challenge-response authentication. OpenMAIP also provides an optional RC4 cryptography layer, further extensible to public-private key DHSS.&lt;br /&gt;
|}&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Known chat channels==&lt;br /&gt;
This list is intended to reduce the number of scripts using the same chat channel number. &lt;br /&gt;
Please try and keep them in sequence.&lt;br /&gt;
{| {{Prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Channel&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Creator&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Messages&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|| 1, 4, 5, 9&lt;br /&gt;
|| Unknown&lt;br /&gt;
|| Very common in poseballs&lt;br /&gt;
|| &amp;quot;hide&amp;quot;, &amp;quot;show&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|| 4&lt;br /&gt;
|| {{User|Mo Noel}}&lt;br /&gt;
|| Default channel for chat redirection like in gags or other voice manipulating tools&lt;br /&gt;
|-&lt;br /&gt;
|| 5&lt;br /&gt;
|| Psistorm Ikura&lt;br /&gt;
|| PsiCorp Products&lt;br /&gt;
|-&lt;br /&gt;
|| 6&lt;br /&gt;
|| grumble Loudon&lt;br /&gt;
|| pre-appended text and say it.&lt;br /&gt;
|| &amp;quot;/6 hello&amp;quot; becomes &amp;quot;/me Lion says: hello&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|| 8&lt;br /&gt;
|| {{User|Henri Beauchamp}}&lt;br /&gt;
|| Cool Collar command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 9&lt;br /&gt;
|| DCS And Most Modern SLRPG Frame Works&lt;br /&gt;
|| Command channel for user commands for Combat Systems/ SLRPG Frameworks like DCS&lt;br /&gt;
|| /9on /9 reset /9&amp;lt;power&amp;gt; etc&lt;br /&gt;
|-&lt;br /&gt;
|| 10&lt;br /&gt;
|| [[ACE BnT]]/[[IntLibber Brautigan]]&lt;br /&gt;
|| Ancapistan Capital Exchange ATM user interface channel&lt;br /&gt;
|| &amp;quot;balance&amp;quot;,&amp;quot;withdraw&amp;quot;,&amp;quot;help&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|| 11&lt;br /&gt;
|| {{User|Mo Noel}}&lt;br /&gt;
|| Default channel of chat command interface of MoDesign products&lt;br /&gt;
|-&lt;br /&gt;
|| 12&lt;br /&gt;
|| Unknown&lt;br /&gt;
|| title and status of damage meter (combat system)&lt;br /&gt;
|-&lt;br /&gt;
|| 20&lt;br /&gt;
|| Unknown&lt;br /&gt;
|| SafeZone interface (combat system)&lt;br /&gt;
|-&lt;br /&gt;
|| 22&lt;br /&gt;
|| {{User|Henri Beauchamp}}&lt;br /&gt;
|| Cool Cuffs command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 22&lt;br /&gt;
|| {{User|unknown}}&lt;br /&gt;
|| OOC Textiness. Says what you type.&lt;br /&gt;
|-&lt;br /&gt;
|| 22&lt;br /&gt;
|| {{User|Corvan Nansen}}&lt;br /&gt;
|| Chat Enhancer. Out Of Character speech.&lt;br /&gt;
|-&lt;br /&gt;
|| 33&lt;br /&gt;
|| {{User|Henri Beauchamp}}&lt;br /&gt;
|| Cool Nipples command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 33&lt;br /&gt;
|| unknown&lt;br /&gt;
|| Collar&lt;br /&gt;
|-&lt;br /&gt;
|| 35&lt;br /&gt;
|| {{User|Corvan Nansen}}&lt;br /&gt;
|| Chat Enhancer Command channel.&lt;br /&gt;
|-&lt;br /&gt;
|| 36&lt;br /&gt;
|| {{User|Corvan Nansen}}&lt;br /&gt;
|| Ultimate Titler Command channel.&lt;br /&gt;
|-&lt;br /&gt;
|| 42&lt;br /&gt;
|| unknown&lt;br /&gt;
|| Common channel used by wiki example scripts&lt;br /&gt;
|- &lt;br /&gt;
|| 42, 55, 66, 77&lt;br /&gt;
|| Psistorm Ikura&lt;br /&gt;
|| Aventity avatar scripts&lt;br /&gt;
|-&lt;br /&gt;
|| 44&lt;br /&gt;
|| {{User|Corvan Nansen}}&lt;br /&gt;
|| Chat Enhancer. In Character speech.&lt;br /&gt;
|-&lt;br /&gt;
|| 45, 54&lt;br /&gt;
|| Ilobmirt Tenk&lt;br /&gt;
|| FOSSL Vending System Client/Server default command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 55&lt;br /&gt;
|| {{User|Henri Beauchamp}}&lt;br /&gt;
|| Cool Chastity Belt command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 63&lt;br /&gt;
|| {{User|FlipperPA Peregrine}}&lt;br /&gt;
|| FlipTitle and &amp;quot;Flip mod&amp;quot; Franimation commands&lt;br /&gt;
|-&lt;br /&gt;
|| 66&lt;br /&gt;
|| Travis Lambert&lt;br /&gt;
|| BanLink default chat command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 66&lt;br /&gt;
|| {{User|Henri Beauchamp}}&lt;br /&gt;
|| Cool Diaper command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 66&lt;br /&gt;
|| {{User|Corvan Nansen}}&lt;br /&gt;
|| Chat Enhancer. In Character emotes.&lt;br /&gt;
|-&lt;br /&gt;
|| 69&lt;br /&gt;
|| {{User|Henri Beauchamp}}&lt;br /&gt;
|| Cool Penis &amp;amp; Cool Pussy command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 77&lt;br /&gt;
|| {{User|Marine Kelley}}&lt;br /&gt;
|| Real Restraints and similar BDSM equipment&lt;br /&gt;
|-&lt;br /&gt;
|| 77&lt;br /&gt;
|| Xarrk Dagger&lt;br /&gt;
|| KAIIA Systems devices default chat command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 88&lt;br /&gt;
|| Cadroe Murphy&lt;br /&gt;
|| Used by ShapeGen and other building tools&lt;br /&gt;
|-&lt;br /&gt;
|| 88&lt;br /&gt;
|| {{User|Corvan Nansen}}&lt;br /&gt;
|| Chat Enhancer. Narration channel.&lt;br /&gt;
|-&lt;br /&gt;
|| 88&lt;br /&gt;
|| {{User|Sharie Criss}}&lt;br /&gt;
|| Owners plugin for Marine Kelley&#039;s Real Restraint equipment. Chat command channel.&lt;br /&gt;
|-&lt;br /&gt;
|| 99&lt;br /&gt;
|| unknown&lt;br /&gt;
|| Dance Bracelets&lt;br /&gt;
|-&lt;br /&gt;
|| 100&lt;br /&gt;
|| {{User|Mo Noel}}&lt;br /&gt;
|| Channel used to ask the user for chat line entries from within usual dialog sessions&lt;br /&gt;
|-&lt;br /&gt;
|| 100-999 (Randomly chosen periodically)&lt;br /&gt;
|| {{User|Corvan Nansen}}&lt;br /&gt;
|| Ultimate Titler. Title setting channel.&lt;br /&gt;
|-&lt;br /&gt;
|| -666 &lt;br /&gt;
|| {{User|Dimentox Travanti}}&lt;br /&gt;
|| [[DCS]]: Unit to Hud Status Update Channel&lt;br /&gt;
|-&lt;br /&gt;
|| 777&lt;br /&gt;
|| Hank Ramos&lt;br /&gt;
|| [[Universal Translator]]: channel to allow users to open a dialog-box using a chat command on channel #777.  Only accepted command on this channel is &amp;quot;translator&amp;quot; and all other chat is ignored.  Allows user to silently bring up dialog by hiding command as &amp;quot;/777 translator&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|| 888&lt;br /&gt;
|| Xarrk Dagger&lt;br /&gt;
|| KAIIA Systems device identification channel&lt;br /&gt;
|-&lt;br /&gt;
|| 2776&lt;br /&gt;
|| Tdub Dowler, Riden Blaisdale&lt;br /&gt;
|| Used for transmitting a csv list of keys for use in sim wide radars&lt;br /&gt;
|-&lt;br /&gt;
|| 4123 - 4130&lt;br /&gt;
|| {{User|Lastro Greenwood}}&lt;br /&gt;
|| Used by the Life Support System&lt;br /&gt;
|-&lt;br /&gt;
|| 9001, 908070&lt;br /&gt;
|| Mystical Cookie&lt;br /&gt;
|| MystiTool gesture commands, patch installers&lt;br /&gt;
|-&lt;br /&gt;
||10748, -10748&lt;br /&gt;
|| Lee Ponzu&lt;br /&gt;
|| Commonly used in scripts by Ponzu&lt;br /&gt;
|-&lt;br /&gt;
|| 31984&lt;br /&gt;
|| {{User|Coraa Prior}}&lt;br /&gt;
|| ACME interface (combat system)&lt;br /&gt;
|-&lt;br /&gt;
||-8888&lt;br /&gt;
||{{User|Kyrah Abattoir}}&lt;br /&gt;
||LockMeister communications channel&lt;br /&gt;
|-&lt;br /&gt;
||-9119&lt;br /&gt;
||Lillani Lowell&lt;br /&gt;
||LockGuard communications channel&lt;br /&gt;
|-&lt;br /&gt;
||-426956&lt;br /&gt;
||{{User|Ganymede Ceriaptrix}}&lt;br /&gt;
|| Ganymedia Open Metaverse Application Internetworking Protocol (OpenMAIP): Broadcast Communications Channel (&amp;lt;code&amp;gt;MAIP_BROADCAST&amp;lt;/code&amp;gt;). Used for public OpenMAIP service discovery queries. Region-wide. See the [[LSL Protocol/Ganymedia OpenMAIP v1.0 Specification|Ganymedia OpenMAIP v1.0 Specification]] for further information.&lt;br /&gt;
|-&lt;br /&gt;
||-504xxx&lt;br /&gt;
||Gal Canning&lt;br /&gt;
||only whispered inter-prim communication&lt;br /&gt;
|-&lt;br /&gt;
||-888888&lt;br /&gt;
||{{User|Henri Beauchamp}}&lt;br /&gt;
||Cool Hud communications channel&lt;br /&gt;
|-&lt;br /&gt;
||-2766532&lt;br /&gt;
||Hank Ramos&lt;br /&gt;
||[[Universal Translator]]: &amp;quot;back-channel&amp;quot; for inter-translator communications.  This is an encrypted channel that passes translation and command-control messages between translators that are linked together to spread the translation load and HTTP communications.&lt;br /&gt;
|-&lt;br /&gt;
||-23000xxxx&lt;br /&gt;
||Cyphr Bellic&lt;br /&gt;
||Default BelliCorp public safety communications. Typically encrypted. UsesRegionSay. User may change some channels, however some are hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
||-1812221819&lt;br /&gt;
||{{User|Marine Kelley}}&lt;br /&gt;
||RestrainedLife relay communications channel&lt;br /&gt;
|-&lt;br /&gt;
||-828983023&lt;br /&gt;
||{{User|Very Keynes}}&lt;br /&gt;
||VK-NET Public Channel for Inter Network Communication and Local Network Address Acquisition.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Lastro Greenwood</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LSL_Protocol&amp;diff=945503</id>
		<title>LSL Protocol</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LSL_Protocol&amp;diff=945503"/>
		<updated>2010-06-22T10:23:27Z</updated>

		<summary type="html">&lt;p&gt;Lastro Greenwood: /* Known chat channels */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header|ml=*}}&lt;br /&gt;
==Script protocols and known chat channels==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 0.5em 0.5em 1.5em&amp;quot;&amp;gt;&lt;br /&gt;
Some times, scripts in Second Life send messages to one another to exchange information or coordinate behavior.  The rules for that conversation are a &#039;&#039;protocol&#039;&#039;.  Being able to say &amp;quot;/1show&amp;quot; or &amp;quot;/1hug lee&amp;quot; are examples.&lt;br /&gt;
&lt;br /&gt;
Such protocols use a common [[chat channel]].  The examples above use channel 1.  They could just as easily have used any other number, but a user (and other objects) have to have some way to find the correct number.&lt;br /&gt;
&lt;br /&gt;
Some protocols, such as combat systems, are quite complicated and could be better documented.  This page can be used to help prevent conflicts and allow multiple programmers to coordinate the protocol definitions.&lt;br /&gt;
&lt;br /&gt;
Protocols can also be note card systems and systems that use object names.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;box&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Protocol list ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 0.5em&amp;quot;&amp;gt;&lt;br /&gt;
Add a protocol here if it is widely used, or might be sometime in the future.&lt;br /&gt;
&lt;br /&gt;
A protocol in this list should also have its own pages where the protocol is defined in some detail.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| {{Prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Name&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Creator&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/Cool_Hud_Protocol|Cool Hud]]&lt;br /&gt;
|| {{User|Henri Beauchamp}}&lt;br /&gt;
|| Universal Hud protocol.&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/ListMessage|ListMessage]]&lt;br /&gt;
|| Anonymous&lt;br /&gt;
|| Send and receive lists, non-lists, non-results, verb-not-found, and partially evaluated Polish expressions.&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/LockMeister System|LockMeister System]]&lt;br /&gt;
|| Kyrah Abattoir&lt;br /&gt;
|| Used to coordinate different parts of bondage toys.&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/EasyTalk]]&lt;br /&gt;
|| Salahzar Stenvaag&lt;br /&gt;
|| |Very Easy and simple communication protocol. Use it to simply coordinate llSay/llRegionSay/llListen objects, as well as linked set&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/RestrainedLoveAPI|RestrainedLove viewer API]]&lt;br /&gt;
|| Marine Kelley&lt;br /&gt;
|| Use the features of the RestrainedLove viewer through llOwnerSay() calls.&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/Restrained Love Relay Specs|RestrainedLove viewer relay spec]]&lt;br /&gt;
|| Marine Kelley&lt;br /&gt;
|| Allow your furniture or cages to issue commands to the user&#039;s RestrainedLove viewer&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/Restrained Life Open Relay Group|RestrainedLove viewer open relay spec]]&lt;br /&gt;
|| Open Relay Group&lt;br /&gt;
|| A superset of the RestrainedLife viewer relay spec with useful extensions created and maintained by the community.&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/P Vendor Linked Messages API &amp;amp; Environment|P Vendor Linked Messages API &amp;amp; Environment]]&lt;br /&gt;
|| Zep Palen&lt;br /&gt;
|| Allows an owner of the P Vendor system to develope custom vendors and use the API for input/output&lt;br /&gt;
|-&lt;br /&gt;
|| [[User:Nexii_Malthus/Script_API|Script API]]&lt;br /&gt;
|| Nexii Malthus&lt;br /&gt;
|| A protocol to provide a useful communication layer between LSL scripts and supported clients, as well as a useful and purposeful feature set. (Vertical Life and Plywood clients currently)&lt;br /&gt;
|-&lt;br /&gt;
|| [[LSL Protocol/Ganymedia OpenMAIP v1.0 Specification|OpenMAIP]]&lt;br /&gt;
|| Ganymede Ceriaptrix&lt;br /&gt;
|| &#039;&#039;Note: Specification is presently incomplete.&#039;&#039; Ganymedia OpenMAIP (Metaverse Application Internetworking Protocol) provides a TCP/IP-like routing and service-oriented message exchange protocol across multiple transport methods (including cross-simulator and cross-grid); allowing scripts to advertise their available functions, and relevant commands, to external and/or third-party scripts and viewers. Controlled access to closed functions is provided via RC4 challenge-response authentication. OpenMAIP also provides an optional RC4 cryptography layer, further extensible to public-private key DHSS.&lt;br /&gt;
|}&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Known chat channels==&lt;br /&gt;
This list is intended to reduce the number of scripts using the same chat channel number. &lt;br /&gt;
Please try and keep them in sequence.&lt;br /&gt;
{| {{Prettytable}}&lt;br /&gt;
|-&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Channel&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Creator&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|{{Hl2}}| &#039;&#039;&#039;Messages&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|| 1, 4, 5, 9&lt;br /&gt;
|| Unknown&lt;br /&gt;
|| Very common in poseballs&lt;br /&gt;
|| &amp;quot;hide&amp;quot;, &amp;quot;show&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|| 4&lt;br /&gt;
|| {{User|Mo Noel}}&lt;br /&gt;
|| Default channel for chat redirection like in gags or other voice manipulating tools&lt;br /&gt;
|-&lt;br /&gt;
|| 5&lt;br /&gt;
|| Psistorm Ikura&lt;br /&gt;
|| PsiCorp Products&lt;br /&gt;
|-&lt;br /&gt;
|| 6&lt;br /&gt;
|| grumble Loudon&lt;br /&gt;
|| pre-appended text and say it.&lt;br /&gt;
|| &amp;quot;/6 hello&amp;quot; becomes &amp;quot;/me Lion says: hello&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|| 8&lt;br /&gt;
|| {{User|Henri Beauchamp}}&lt;br /&gt;
|| Cool Collar command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 9&lt;br /&gt;
|| DCS And Most Modern SLRPG Frame Works&lt;br /&gt;
|| Command channel for user commands for Combat Systems/ SLRPG Frameworks like DCS&lt;br /&gt;
|| /9on /9 reset /9&amp;lt;power&amp;gt; etc&lt;br /&gt;
|-&lt;br /&gt;
|| 10&lt;br /&gt;
|| [[ACE BnT]]/[[IntLibber Brautigan]]&lt;br /&gt;
|| Ancapistan Capital Exchange ATM user interface channel&lt;br /&gt;
|| &amp;quot;balance&amp;quot;,&amp;quot;withdraw&amp;quot;,&amp;quot;help&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|| 11&lt;br /&gt;
|| {{User|Mo Noel}}&lt;br /&gt;
|| Default channel of chat command interface of MoDesign products&lt;br /&gt;
|-&lt;br /&gt;
|| 12&lt;br /&gt;
|| Unknown&lt;br /&gt;
|| title and status of damage meter (combat system)&lt;br /&gt;
|-&lt;br /&gt;
|| 20&lt;br /&gt;
|| Unknown&lt;br /&gt;
|| SafeZone interface (combat system)&lt;br /&gt;
|-&lt;br /&gt;
|| 22&lt;br /&gt;
|| {{User|Henri Beauchamp}}&lt;br /&gt;
|| Cool Cuffs command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 22&lt;br /&gt;
|| {{User|unknown}}&lt;br /&gt;
|| OOC Textiness. Says what you type.&lt;br /&gt;
|-&lt;br /&gt;
|| 22&lt;br /&gt;
|| {{User|Corvan Nansen}}&lt;br /&gt;
|| Chat Enhancer. Out Of Character speech.&lt;br /&gt;
|-&lt;br /&gt;
|| 33&lt;br /&gt;
|| {{User|Henri Beauchamp}}&lt;br /&gt;
|| Cool Nipples command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 33&lt;br /&gt;
|| unknown&lt;br /&gt;
|| Collar&lt;br /&gt;
|-&lt;br /&gt;
|| 35&lt;br /&gt;
|| {{User|Corvan Nansen}}&lt;br /&gt;
|| Chat Enhancer Command channel.&lt;br /&gt;
|-&lt;br /&gt;
|| 36&lt;br /&gt;
|| {{User|Corvan Nansen}}&lt;br /&gt;
|| Ultimate Titler Command channel.&lt;br /&gt;
|-&lt;br /&gt;
|| 42&lt;br /&gt;
|| unknown&lt;br /&gt;
|| Common channel used by wiki example scripts&lt;br /&gt;
|- &lt;br /&gt;
|| 42, 55, 66, 77&lt;br /&gt;
|| Psistorm Ikura&lt;br /&gt;
|| Aventity avatar scripts&lt;br /&gt;
|-&lt;br /&gt;
|| 44&lt;br /&gt;
|| {{User|Corvan Nansen}}&lt;br /&gt;
|| Chat Enhancer. In Character speech.&lt;br /&gt;
|-&lt;br /&gt;
|| 45, 54&lt;br /&gt;
|| Ilobmirt Tenk&lt;br /&gt;
|| FOSSL Vending System Client/Server default command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 55&lt;br /&gt;
|| {{User|Henri Beauchamp}}&lt;br /&gt;
|| Cool Chastity Belt command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 63&lt;br /&gt;
|| {{User|FlipperPA Peregrine}}&lt;br /&gt;
|| FlipTitle and &amp;quot;Flip mod&amp;quot; Franimation commands&lt;br /&gt;
|-&lt;br /&gt;
|| 66&lt;br /&gt;
|| Travis Lambert&lt;br /&gt;
|| BanLink default chat command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 66&lt;br /&gt;
|| {{User|Henri Beauchamp}}&lt;br /&gt;
|| Cool Diaper command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 66&lt;br /&gt;
|| {{User|Corvan Nansen}}&lt;br /&gt;
|| Chat Enhancer. In Character emotes.&lt;br /&gt;
|-&lt;br /&gt;
|| 69&lt;br /&gt;
|| {{User|Henri Beauchamp}}&lt;br /&gt;
|| Cool Penis &amp;amp; Cool Pussy command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 77&lt;br /&gt;
|| {{User|Marine Kelley}}&lt;br /&gt;
|| Real Restraints and similar BDSM equipment&lt;br /&gt;
|-&lt;br /&gt;
|| 77&lt;br /&gt;
|| Xarrk Dagger&lt;br /&gt;
|| KAIIA Systems devices default chat command channel&lt;br /&gt;
|-&lt;br /&gt;
|| 88&lt;br /&gt;
|| Cadroe Murphy&lt;br /&gt;
|| Used by ShapeGen and other building tools&lt;br /&gt;
|-&lt;br /&gt;
|| 88&lt;br /&gt;
|| {{User|Corvan Nansen}}&lt;br /&gt;
|| Chat Enhancer. Narration channel.&lt;br /&gt;
|-&lt;br /&gt;
|| 88&lt;br /&gt;
|| {{User|Sharie Criss}}&lt;br /&gt;
|| Owners plugin for Marine Kelley&#039;s Real Restraint equipment. Chat command channel.&lt;br /&gt;
|-&lt;br /&gt;
|| 99&lt;br /&gt;
|| unknown&lt;br /&gt;
|| Dance Bracelets&lt;br /&gt;
|-&lt;br /&gt;
|| 100&lt;br /&gt;
|| {{User|Mo Noel}}&lt;br /&gt;
|| Channel used to ask the user for chat line entries from within usual dialog sessions&lt;br /&gt;
|-&lt;br /&gt;
|| 100-999 (Randomly chosen periodically)&lt;br /&gt;
|| {{User|Corvan Nansen}}&lt;br /&gt;
|| Ultimate Titler. Title setting channel.&lt;br /&gt;
|-&lt;br /&gt;
|| -666 &lt;br /&gt;
|| {{User|Dimentox Travanti}}&lt;br /&gt;
|| [[DCS]]: Unit to Hud Status Update Channel&lt;br /&gt;
|-&lt;br /&gt;
|| 777&lt;br /&gt;
|| Hank Ramos&lt;br /&gt;
|| [[Universal Translator]]: channel to allow users to open a dialog-box using a chat command on channel #777.  Only accepted command on this channel is &amp;quot;translator&amp;quot; and all other chat is ignored.  Allows user to silently bring up dialog by hiding command as &amp;quot;/777 translator&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|| 888&lt;br /&gt;
|| Xarrk Dagger&lt;br /&gt;
|| KAIIA Systems device identification channel&lt;br /&gt;
|-&lt;br /&gt;
|| 2776&lt;br /&gt;
|| Tdub Dowler, Riden Blaisdale&lt;br /&gt;
|| Used for transmitting a csv list of keys for use in sim wide radars&lt;br /&gt;
|-&lt;br /&gt;
|| 4123 - 4130&lt;br /&gt;
|| Lastro Greenwood&lt;br /&gt;
|| Used by the Life Support System&lt;br /&gt;
|-&lt;br /&gt;
|| 9001, 908070&lt;br /&gt;
|| Mystical Cookie&lt;br /&gt;
|| MystiTool gesture commands, patch installers&lt;br /&gt;
|-&lt;br /&gt;
||10748, -10748&lt;br /&gt;
|| Lee Ponzu&lt;br /&gt;
|| Commonly used in scripts by Ponzu&lt;br /&gt;
|-&lt;br /&gt;
|| 31984&lt;br /&gt;
|| {{User|Coraa Prior}}&lt;br /&gt;
|| ACME interface (combat system)&lt;br /&gt;
|-&lt;br /&gt;
||-8888&lt;br /&gt;
||{{User|Kyrah Abattoir}}&lt;br /&gt;
||LockMeister communications channel&lt;br /&gt;
|-&lt;br /&gt;
||-9119&lt;br /&gt;
||Lillani Lowell&lt;br /&gt;
||LockGuard communications channel&lt;br /&gt;
|-&lt;br /&gt;
||-426956&lt;br /&gt;
||{{User|Ganymede Ceriaptrix}}&lt;br /&gt;
|| Ganymedia Open Metaverse Application Internetworking Protocol (OpenMAIP): Broadcast Communications Channel (&amp;lt;code&amp;gt;MAIP_BROADCAST&amp;lt;/code&amp;gt;). Used for public OpenMAIP service discovery queries. Region-wide. See the [[LSL Protocol/Ganymedia OpenMAIP v1.0 Specification|Ganymedia OpenMAIP v1.0 Specification]] for further information.&lt;br /&gt;
|-&lt;br /&gt;
||-504xxx&lt;br /&gt;
||Gal Canning&lt;br /&gt;
||only whispered inter-prim communication&lt;br /&gt;
|-&lt;br /&gt;
||-888888&lt;br /&gt;
||{{User|Henri Beauchamp}}&lt;br /&gt;
||Cool Hud communications channel&lt;br /&gt;
|-&lt;br /&gt;
||-2766532&lt;br /&gt;
||Hank Ramos&lt;br /&gt;
||[[Universal Translator]]: &amp;quot;back-channel&amp;quot; for inter-translator communications.  This is an encrypted channel that passes translation and command-control messages between translators that are linked together to spread the translation load and HTTP communications.&lt;br /&gt;
|-&lt;br /&gt;
||-23000xxxx&lt;br /&gt;
||Cyphr Bellic&lt;br /&gt;
||Default BelliCorp public safety communications. Typically encrypted. UsesRegionSay. User may change some channels, however some are hardcoded.&lt;br /&gt;
|-&lt;br /&gt;
||-1812221819&lt;br /&gt;
||{{User|Marine Kelley}}&lt;br /&gt;
||RestrainedLife relay communications channel&lt;br /&gt;
|-&lt;br /&gt;
||-828983023&lt;br /&gt;
||{{User|Very Keynes}}&lt;br /&gt;
||VK-NET Public Channel for Inter Network Communication and Local Network Address Acquisition.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Lastro Greenwood</name></author>
	</entry>
</feed>