Public Trampoline Script

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Indentation)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
{{Template:Quicklinks}}
+
{{Quicklinks}}
<br />
+
  
float force_amount = 999.0;
+
<source lang="lsl">
default
+
float force_amount = 999.0;
{
+
 
    collision_start(integer tnum)
+
default
    {
+
{
        // UnComment this if you want to trigger a sound
+
    collision_start(integer tnum)
        // llTriggerSound("trampoline", 0.5);
+
    {
        if (llDetectedType(0) & AGENT)
+
        // UnComment this if you want to trigger a sound
            llPushObject(llDetectedKey(0), force_amount*llRot2Up(llGetRot()), ZERO_VECTOR, FALSE);
+
        // llTriggerSound("trampoline", 0.5);
    }
+
        if (llDetectedType(0) & AGENT)
}
+
        llPushObject(llDetectedKey(0), force_amount*llRot2Up(llGetRot()), ZERO_VECTOR, FALSE);
 +
    }
 +
}
 +
</source>
  
 
[[Category:Scripts]]
 
[[Category:Scripts]]

Latest revision as of 07:32, 22 September 2020

float force_amount = 999.0;
 
default
{
    collision_start(integer tnum)
    {
        // UnComment this if you want to trigger a sound
        // llTriggerSound("trampoline", 0.5);
        if (llDetectedType(0) & AGENT)
        llPushObject(llDetectedKey(0), force_amount*llRot2Up(llGetRot()), ZERO_VECTOR, FALSE);
    }
}
Personal tools
General
About This Wiki