Public Trampoline Script: Difference between revisions

From OpenSimulator
Jump to navigationJump to search
imported>Teravus
 
imported>Djphil
m Indentation
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
__NOTOC__
{{Quicklinks}}
<source lang="lsl">
float force_amount = 999.0;
float force_amount = 999.0;
default
default
{
{
Line 7: Line 12:
         // llTriggerSound("trampoline", 0.5);
         // llTriggerSound("trampoline", 0.5);
         if (llDetectedType(0) & AGENT)
         if (llDetectedType(0) & AGENT)
            llPushObject(llDetectedKey(0), force_amount*llRot2Up(llGetRot()), ZERO_VECTOR, FALSE);
        llPushObject(llDetectedKey(0), force_amount*llRot2Up(llGetRot()), ZERO_VECTOR, FALSE);
     }
     }
}
}
</source>
[[Category:Scripts]]

Latest revision as of 14: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);
    }
}