Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float scale_factor = 8.0;
- default
- {
- state_entry()
- {
- llListen(-999, "","","");
- }
- listen(integer channel, string name, key id, string message)
- {
- list hitOwner = llGetObjectDetails(id, ([OBJECT_OWNER]));
- list details = llGetObjectDetails(llList2Key(hitOwner, 0), ([OBJECT_NAME, OBJECT_POS, OBJECT_ROT, OBJECT_VELOCITY]));
- llOwnerSay(llList2String(details, 2));
- vector hit = llList2Vector(details, 3)*llEuler2Rot(<0, 30, 0> * DEG_TO_RAD);
- rotation rot = llList2Rot(details, 2);
- vector velocity = (llGetMass() * scale_factor * hit);
- llOwnerSay("hit");
- llSetStatus(STATUS_PHYSICS, TRUE);
- llApplyImpulse(velocity, TRUE);
- llSetTimerEvent(300.0);
- }
- timer()
- {
- llDie();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment