I need lines for my bullet script
|
Corporal Candour
Registered User
Join date: 3 Sep 2005
Posts: 38
|
09-18-2005 15:22
Ok, all I need is a line to insert to make a bullet push a person, you know like a push gun. Also I need the line where the bullet vanishes when it hits something. Thanks a bunch!
-Joe
|
Julian Fate
80's Pop Star
Join date: 19 Oct 2003
Posts: 1,020
|
09-18-2005 15:47
For the first part: llSetStatus(THIS_IS_A_BAD_IDEA, TRUE); And for the second part: collision_start(integer num_detected) { llDie(); }
|
Corporal Candour
Registered User
Join date: 3 Sep 2005
Posts: 38
|
09-18-2005 16:32
Perhaps someone else can tell me what the answer to the first question is...
Im not necessarily shooting avatars, maybe objects, you know. Been working on my .45 Colt for a while now.
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
09-18-2005 16:45
From: Corporal Candour Perhaps someone else can tell me what the answer to the first question is... Im not necessarily shooting avatars, maybe objects, you know. Been working on my .45 Colt for a while now. Easy: collision_start(integer n) { llPushObject(llGetOwner(), llGetVel() * ( 9.8 * llGetObjectMass(llDetectedKey(0))), ZERO_VECTOR, FALSE); } So, on collision push an object or avatar the same as the overall velocity of the bullet times 9.8 (gravity constant) time the mass of the struck object, don't put a rotational force on it, and use global coordinates. Hope this helps.
|
Corporal Candour
Registered User
Join date: 3 Sep 2005
Posts: 38
|
09-18-2005 17:29
Ok, my problem now is that my bullets wont disappear at all. When I use the script mentioned above that calls for the "die" function, nothing happens. What's going wrong here?
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
09-19-2005 15:35
Try a little bit of debugging code... just before your llDie, put the line llOwnerSay("Attempting suicide..."  ; Then, make sure that you hear that. If you don't, the problem lies elsewhere. If you do, I have no idea what the heck is wrong. And in the push script, you might want llDetectedKey(0) instead of llGetOwner().
|
Julian Fate
80's Pop Star
Join date: 19 Oct 2003
Posts: 1,020
|
09-19-2005 20:06
From: Keknehv Psaltery And in the push script, you might want llDetectedKey(0) instead of llGetOwner(). Party pooper.
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
09-19-2005 20:29
Ah, I was wondering if that was intentional or not. Thank you.
Think I should edit my post out?
|
Julian Fate
80's Pop Star
Join date: 19 Oct 2003
Posts: 1,020
|
09-19-2005 21:46
Nah, the llGetOwner() has probably gotten all the use it's going to already. 
|