Guest User

Untitled

a guest
Aug 27th, 2017
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. float scale_factor = 8.0;
  2.  
  3.  
  4. default
  5. {
  6. state_entry()
  7. {
  8. llListen(-999, "","","");
  9.  
  10. }
  11.  
  12. listen(integer channel, string name, key id, string message)
  13. {
  14.  
  15. list hitOwner = llGetObjectDetails(id, ([OBJECT_OWNER]));
  16. list details = llGetObjectDetails(llList2Key(hitOwner, 0), ([OBJECT_NAME, OBJECT_POS, OBJECT_ROT, OBJECT_VELOCITY]));
  17. llOwnerSay(llList2String(details, 2));
  18. vector hit = llList2Vector(details, 3)*llEuler2Rot(<0, 30, 0> * DEG_TO_RAD);
  19. rotation rot = llList2Rot(details, 2);
  20. vector velocity = (llGetMass() * scale_factor * hit);
  21. llOwnerSay("hit");
  22. llSetStatus(STATUS_PHYSICS, TRUE);
  23. llApplyImpulse(velocity, TRUE);
  24. llSetTimerEvent(300.0);
  25. }
  26.  
  27. timer()
  28. {
  29. llDie();
  30. }
  31.  
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment