**__Joker Opus's EarthQuake Script__**
' '
NOTE- This was created by Joethecatboy Freelunch and Joker Opus. It is not to be stolen. You are free to mod this, but please do not steal ' '
So enjoy this as you please, and have fun!
//////////Created, September, 2006.///////////////
///-By Joethecatboy Freelunch and Joker Opus///
//If you plan to copy, mod it, don't steal//
//*~*Commentry by Joker Opus*~*//
float BlastRadius = 20;//This indicates the radius in which the push is effected. In this case, 30 meters
float Power = 21.0;//This is the power that the object shakes agents at.
default
{
on_rez(integer param)
{
llResetScript();//Scripts always get messed up if you dont have the script reset on rez if there is a Listen event. Because if it doesnt reset, it thinks the owner is still the person who made the script.
}
state_entry()
{
llOwnerSay("OWNAGE");
llListen(0,"",llGetOwner(),"");
}
touch_start(integer num_detected)
{
llSensorRepeat("",NULL_KEY,AGENT|PASSIVE,20.0,PI,.01);//Sensor repeat is scanning over and over for the targets within 20 meters. including objects (hence passive)
}
sensor(integer j)
{
vector MyPos = llGetPos(); //gets my position..
integer i;
for (i=0;i<j;i++){
if (llDetectedKey(i) == llGetOwner())
{
i++;
}
else{
float Distance = llVecDist(MyPos, llDetectedPos(i) );//Makes it so it wont effect the owner
llPushObject(llDetectedKey(i), <0.0, 0.0,Power * llPow(Distance,3.0)>, ZERO_VECTOR, TRUE);
llPushObject(llDetectedKey(i), <0.0, 0.0,Power * 2 * llPow(Distance,3.0)*-1>, ZERO_VECTOR, TRUE);//This is the part thats actually pushing the people
}
}
}
listen(integer channel, string name, key id, string message)
{
if (message == "die")
{ //You can add a die timer, but I made a comand to delete the object, if you say 'die' it deletes =)
llSensorRemove();
llDie();
}
}
}