Join us in Outworldz at or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Building Falling_Prims_Script  



Category: Building
By : Ferd Frederix
Created: 2011-08-27 Edited: 2011-08-27
Worlds: Second Life

the Zip file

Download all files for Falling_Prims_Script
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Falling_Prims_Script_1.lsl

This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1 vector PUSH = <0,50,0>; // bigger numbers make it fall over and further away, Pushes in the Y axis < X ,Y, Z>
2 // you may have to change this to <50,0,0> or even <0,0,50> depending upon how your object is rotated
3 // if you set this to <0,0,0> it will not fall over except by gravity and any force from the collision itself
5 vector myPos; // place to store the initial position
6 rotation myRot; // place to store the initial rotation
9 default
10 {
13 {
14 llSetStatus(STATUS_PHYSICS, FALSE); // make it Non-physical
15 myPos = llGetPos(); // save the initial position and rotation so we can set it back upright when reset
16 myRot = llGetRot();
17 }
20 {
21 llSetStatus(STATUS_PHYSICS, TRUE); // make it physical
22 llSleep(0.1); // give time for the physics engine to kick in.
23 llPushObject(llGetKey(), PUSH, PUSH, TRUE); // push it over
24 }
27 {
28 llSetTimerEvent( 10 ); // wait 10 seconds to tilt back up after no more collisions happen
29 }
32 timer()
33 {
34 llSetStatus(STATUS_PHYSICS, FALSE); // make it Non-physical
35 llSleep(0.1); // give time for the physics engine to kick in.
36 llSetPos(myPos); // stand it back upright
37 llSetRot(myRot); // at the original rotation
38 }
41 on_rez(integer start_p)
42 {
44 }
45 }

Back to the Best Free Tools in Second Life and OpenSim.