Page 1 of 2

Status of melee weapons.

Posted: 24 Mar 2008, 04:04
by smoth
Firstly because I fully expect to hear hackish solutions, I am wanting to know if we have melee weapons that can:

1: Not use multiple weapons to counter larger units

2: attack a 2X2 unit or a 20X20 unit just fine by walking up and shooting.

3: not use a weapon emit for it's use


so say, can the weapon be put on a warcraft style footman? Will said footman attack other footmen fine? will it be able to also attack castles?

Again, I want to know about the status of a melee weapon, not using tricks. DO WE HAVE A PROPERmelee weapon yet?

Re: Status of melee weapons.

Posted: 24 Mar 2008, 06:52
by Argh
No, there's nothing exactly like you want. It can be done, though. It's just not a one-liner, easy solution. Hint: for a nearly-perfect solution, you have to use LUA. However, even the "hackish" stuff works fairly well, if you set it up as a conditional cascade.

Re: Status of melee weapons.

Posted: 24 Mar 2008, 08:24
by KDR_11k
weaponType=Melee;

In 76b1 the drawback is that it cannot be used without applying impulse, that's fixed in SVN. I think targetBorder should allow it to attack larger targets as well.

Re: Status of melee weapons.

Posted: 24 Mar 2008, 08:29
by Argh
But you still have the issue of relative range. Or does it entirely not use range at all now?

Re: Status of melee weapons.

Posted: 24 Mar 2008, 08:38
by KDR_11k
What do you think targetBorder DOES?

Probably the biggest problem with melee in Gundam is firearcs, a firearced unit has trouble getting the target in its cone of attack. IIRC when I tried it in Lolimod I came to the conclusion that melee weapons should not have a limited arc or the unit using them will be too slow to turn around.

EDIT: Grrr, it's completely broken in 76b1, targetBorder doesn't seem to do anything. I'm pretty sure it worked in the SVNs preceeding that version, WTF?

Re: Status of melee weapons.

Posted: 24 Mar 2008, 10:58
by imbaczek
maybe there's an issue with cylinderTargeting, too? Those two (targetBorder and cylinderTargetting) should be all set on melee weapons and have sane values, but maybe some changes stopped it from assuming a correct value by default.

Re: Status of melee weapons.

Posted: 24 Mar 2008, 12:13
by KDR_11k
I've tested it with LaserCannons too, the unit tries to close in even though it's already in the hit sphere and it does not attack. I think it might be the unit itself deciding it's not close enough instead of the weapon.

Re: Status of melee weapons.

Posted: 24 Mar 2008, 12:56
by KDR_11k
I did some further testing with Lolimod, the weird thing is it works there, just when I try it with Gundam units (that I have modified to use targetborder) it fails. WTF?

Re: Status of melee weapons.

Posted: 24 Mar 2008, 15:09
by Guessmyname
Possible. Though you might want to use the melee weapon as a dummy then emit an attack, simply to sync it with the attack animation.

Re: Status of melee weapons.

Posted: 24 Mar 2008, 16:34
by KDR_11k
Eh, just make the animation fast enough. I don't think people mind that the KPDZ worm hits a target at the start of its attack animation.

Re: Status of melee weapons.

Posted: 24 Mar 2008, 16:55
by Pxtl
While this is totally the wrong kind of place to suggest features like this - perhaps melee weapons could have a tag for "delay" that determines how long it takes between firing and impact, for the sake of simplicity.

Re: Status of melee weapons.

Posted: 24 Mar 2008, 19:34
by smoth
smoth wrote: 3: not use a weapon emit for it's use
Guessmyname wrote:Possible. Though you might want to use the melee weapon as a dummy then emit an attack, simply to sync it with the attack animation.
:(

that is a good idea pxtl.

Kdr, any idea on why it isn't working with the gundam units?

Re: Status of melee weapons.

Posted: 24 Mar 2008, 20:01
by KDR_11k
If I had one I'd have fixed it already.

Re: Status of melee weapons.

Posted: 24 Mar 2008, 20:03
by smoth
true enough. Sorry.

Re: Status of melee weapons.

Posted: 24 Mar 2008, 20:19
by Guessmyname
smoth wrote:
smoth wrote: 3: not use a weapon emit for it's use
Guessmyname wrote:Possible. Though you might want to use the melee weapon as a dummy then emit an attack, simply to sync it with the attack animation.
:(
I know. I was saying that they do work: the emit thing is only if you want the anim and the actual hit to sync up.

Re: Status of melee weapons.

Posted: 01 Aug 2011, 23:30
by smoth
M-m-monster bump

So I am summoning this thread from the depths...

Looking at melee in the nearish future. A few things I might do:

Unit stops in place does swing animation..
Rapid fires a weapon forward.
Target get hit by weapon call...
Chance to block if direction comes from front...
If success target does block animation...

Thoughts guise?

Re: Status of melee weapons.

Posted: 02 Aug 2011, 01:07
by SanadaUjiosan
If you go through with this, I demand that Char's Zaku's melee attack is a booster kick.

Re: Status of melee weapons.

Posted: 02 Aug 2011, 01:10
by Wombat
didnt MK have good looking melee ? seen some gif/whatever it was. could be good idea to start with that, dunno if u know about it already or not.

Re: Status of melee weapons.

Posted: 02 Aug 2011, 07:25
by SanadaUjiosan
After actually thinking about this some more, will different units have different block chance percentages? Or is this a global value?

Re: Status of melee weapons.

Posted: 02 Aug 2011, 09:44
by knorke
smoth wrote:Unit stops in place does swing animation..
Rapid fires a weapon forward.
Target get hit by weapon call...
Chance to block if direction comes from front...
If success target does block animation...
Yes, that would all work.
Problem I found with short ranged "melee weapons" was that when in close distance (like it happens in melee combat) weapons refuse to fire sometimes. (also a problem with CT's mining if the weapon range is set too low) I think it has to do with hitvolumes intersecting or emit points being inside a hitvolume(?)
Anyway, because I could I not get a weapon to reliably work at "in your face" distance, I made some script thing.
Just a counter for reload/cooldown and then do
AddUnitDamage (NearestTarget)
ApplyImpulse (NearestTarget)
which worked okay-ish. (some of the units in that lol-video with the "unit tentacles" are actually meeling each other using that system)

But I think best would be a gadget that keeps track of all melee units.
ie their recharge, blocking status, and if a attack was blocked.
The gadget would then deal out damage via AddUnitDamage() and use CallAsUnit() to notify units what animation to play (attack/block/hit)