CannonSettingsScripts

This page has the three scripts that should be placed inside of the linked prims that act as the controls for the cannon.

Return to main Cannon page

code format="lsl2" //Written by Jeff Mao //Distributed under a Creative Commons Attribution 3.0 license [CC-BY](http://creativecommons.org/licenses/by/3.0/) //If you have questions about this, please feel free to contact me at jmao@mac.com. //Please share alterations, improvements, lesson plans related to this simulation, etc.
 * Trajectory**

// Get Trajectory - place inside linked prim to activate trajectory listen

default {   touch_start(integer total_number) {       if (llDetectedKey(0) == llGetOwner) llMessageLinked(LINK_SET, 0, "aim", NULL_KEY); } } code

code format="lsl2" //Written by Jeff Mao //Distributed under a Creative Commons Attribution 3.0 license [CC-BY](http://creativecommons.org/licenses/by/3.0/) //If you have questions about this, please feel free to contact me at jmao@mac.com. //Please share alterations, improvements, lesson plans related to this simulation, etc.
 * Initial Velocity**

// Get Velocity - place inside lined prim to activate Velocity listen

default {   touch_start(integer total_number) {       if (llDetectedKey(0) == llGetOwner) llMessageLinked(LINK_SET, 0, "velocity", NULL_KEY); } } code

code format="lsl2" //Written by Jeff Mao //Distributed under a Creative Commons Attribution 3.0 license [CC-BY](http://creativecommons.org/licenses/by/3.0/) //If you have questions about this, please feel free to contact me at jmao@mac.com. //Please share alterations, improvements, lesson plans related to this simulation, etc.
 * Fire**

// Fire - place inside linked prim to activate fire

default {   touch_start(integer total_number) {       if (llDetectedKey(0) == llGetOwner) llMessageLinked(LINK_SET, 0, "fire", NULL_KEY); } }

code