diff options
author | Brian McBee | 2008-01-07 01:03:46 +0000 |
---|---|---|
committer | Brian McBee | 2008-01-07 01:03:46 +0000 |
commit | 35b0c2e9dfbbf811c12c9e3e7d4359a13b987977 (patch) | |
tree | 42e91b37aa581006dc9defb6780ff15319049d3f /bin/assets/ScriptsAssetSet/llApplyImpulse.lsl | |
parent | Factor out inventory code in SceneObjectGroup into seperate class. (diff) | |
download | opensim-SC_OLD-35b0c2e9dfbbf811c12c9e3e7d4359a13b987977.zip opensim-SC_OLD-35b0c2e9dfbbf811c12c9e3e7d4359a13b987977.tar.gz opensim-SC_OLD-35b0c2e9dfbbf811c12c9e3e7d4359a13b987977.tar.bz2 opensim-SC_OLD-35b0c2e9dfbbf811c12c9e3e7d4359a13b987977.tar.xz |
More inventory work for CharlieO. Final patch to make it all work yet to come.
Diffstat (limited to 'bin/assets/ScriptsAssetSet/llApplyImpulse.lsl')
-rw-r--r-- | bin/assets/ScriptsAssetSet/llApplyImpulse.lsl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/assets/ScriptsAssetSet/llApplyImpulse.lsl b/bin/assets/ScriptsAssetSet/llApplyImpulse.lsl new file mode 100644 index 0000000..6b2461f --- /dev/null +++ b/bin/assets/ScriptsAssetSet/llApplyImpulse.lsl | |||
@@ -0,0 +1,16 @@ | |||
1 | //Rez an object, and drop this script in it. | ||
2 | //This will launch it at the owner. | ||
3 | default | ||
4 | { | ||
5 | state_entry() | ||
6 | { | ||
7 | list p = llGetObjectDetails(llGetOwner(), [OBJECT_POS]); | ||
8 | if(p != []) | ||
9 | { | ||
10 | llSetStatus(STATUS_PHYSICS, TRUE); | ||
11 | vector pos = llList2Vector(p, 0); | ||
12 | vector direction = llVecNorm(pos - llGetPos()); | ||
13 | llApplyImpulse(direction * 100, 0); | ||
14 | } | ||
15 | } | ||
16 | } | ||