Join us in Outworldz at www.outworldz.com:9000 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.
Loading

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
Animation Ground_Collision_Protector  

Ground_Collision_Protector

Ground_Collision_Protector

Category: Animation
By : Davy Maltz
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Ground_Collision_Protector
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Ground_Collision_Protector_1.lsl
1 default
2 {
4 {
5 llSetTimerEvent(0.05);
6 }
7 timer()
8 {
9 llSetText("",<0,0,0>,0.0);
10 vector halfourheight = (llGetAgentSize(llGetOwner()) / 2);
11 vector ourpos = llGetPos();
12 vector v;
13 vector velocity = llGetVel();
14 if(ourpos.z <= llGround(v) + halfourheight.z + 2.5 && ourpos.z > llGround(v) + halfourheight.z + 1 &&
15
16 velocity.z < (-10) && llGetAgentInfo(llGetOwner()) & AGENT_IN_AIR)
17 {
18 llApplyImpulse(<0,0,velocity.z * -1.0>,FALSE);
19 llSleep(3.0);
20 }
21 }
22 }

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