aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/bin/assets/ScriptsAssetSet/llApplyImpulse.lsl
blob: add7a08c3578f592046922a28f8f6b546a21638a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//Rez an object, and drop this script in it.
//This will launch it at the owner.
default
{
    state_entry()
    {
        list p = llGetObjectDetails(llGetOwner(), [OBJECT_POS]);
        if(p != [])
        {
            llSetStatus(STATUS_PHYSICS, TRUE);
            vector pos = llList2Vector(p, 0);
            vector direction = llVecNorm(pos - llGetPos());
            llApplyImpulse(direction * 100, 0);
        }
    }
}