Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Meele Weapon Help

Nyx Alsop
Registered User
Join date: 14 Dec 2008
Posts: 252
11-27-2009 15:30
I'm trying to make a Meele weapon for Linden damage, i've been rezzing a transparent box with damage enabled infront of the weapon. The problem is when your running you run into it. If I use llGetVec();, it works until you run backwards then it slams into you.

Any ideas?
Jack Abraham
Lantern By Day
Join date: 11 Apr 2008
Posts: 113
11-27-2009 18:50
llCollisionFilter may be your friend here. What I do is, in on_rez, use llCollisionFilter to filter out collisions with the owner; then set llDamage in collision_start, after verifying I've hit an avatar. But my melee weapons are set to interact with objects I create as well, using collision_start to identify them, so my solution may be needlessly complex for you.
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
11-27-2009 21:03
Jack, have you tried your method with Linden damage, as opposed to that inflicted by a combat system? I thought that Linden damage happens, and the object dies, before the collision event is ever called. I could well be wrong -- it's ages since I've done anything with Linden damage -- but the wiki seems to suggest this is the case.
Nyx Alsop
Registered User
Join date: 14 Dec 2008
Posts: 252
11-28-2009 02:39
I'll test later, but I'm pritty sure it wont work with Linden damage.

There is a way to do it, cause others are using meele weapons.
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
11-28-2009 05:32
From: Nyx Alsop
I'll test later, but I'm pritty sure it wont work with Linden damage.

There is a way to do it, cause others are using meele weapons.
How about detecting your opponent's position when he collides with the transparent cube and, if he's close enough, then have the cube rez an invisible projectile -- targeted at him if necessary -- to do the damage?
Nyx Alsop
Registered User
Join date: 14 Dec 2008
Posts: 252
11-28-2009 09:13
That is a good idea, it could just rezz on top of him, a micro sized prim.
Jack Abraham
Lantern By Day
Join date: 11 Apr 2008
Posts: 113
11-28-2009 17:10
From: Innula Zenovka
Jack, have you tried your method with Linden damage, as opposed to that inflicted by a combat system? I thought that Linden damage happens, and the object dies, before the collision event is ever called.

Innula, I don't set the object to be Linden damaging until the collision event fires -- the call to llDamage is in collision_start. AFAIK, you are correct.
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
11-28-2009 19:20
Thanks, Jack..what a clever way of doing it. I feel a bit like Dr Watson after Sherlock Holmes has explained something to him.. blindingly obvious when it's spelled out, but I'd never have thought of it myself.
Nyx Alsop
Registered User
Join date: 14 Dec 2008
Posts: 252
11-29-2009 03:14
Yeah that explanes it, thanks Jack.