add melee attack range to A_CustomMeleeAttack

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

add melee attack range to A_CustomMeleeAttack

Postby Lagi » Sun Feb 23, 2020 6:38 am

A_CustomMeleeAttack [(int damage [, str meleesound [, str misssound [, str damagetype [, bool bleed]]]])]

please add range parameter into it

I know there is meleerange 44 to be adjust in Actor properites.

Problem is,
    in melee combat if monster hit player with one attack, he push him away from the range of second - if monster do multiple punches by attack, he just wave his arms pointlessly.

    Player need to only make tiny little step back, to completely avoid melee attack, because monster always launch it ASA player is in very max of their meleerange.

    I also cannot set different range for different melee attacks.

    I have to use A_CustomBulletAttack which doesn't support hit/miss sound. And it need a work around with pufftype.

Additional range parameter together with meleerange, allow monster to wait till player come closer, to fully land each blows.
User avatar
Lagi
 
Joined: 23 Jun 2018
Location: Thou shalt alter thy beliefs with new evidence

Re: add melee attack range to A_CustomMeleeAttack

Postby Graf Zahl » Sun Feb 23, 2020 6:50 am

That isn't possible, because the decision to start the attack depends on the meleerange property. So the parameter would never work as expected.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: add melee attack range to A_CustomMeleeAttack

Postby Lagi » Tue Feb 25, 2020 1:13 am

Graf Zahl wrote:...decision to start the attack depends on the meleerange property. So the parameter would never work as expected.
It seems to me, that It would work, as I suggested. I have no clue about source of gzdoom, but I think Melee attack function take the same value from "meleerange" for:
    -starting animation.
    -checking if target can be hurt (if not play miss sound).

meleerange is telling the game when to execute the code after "Melee:" and all animation
- as you write.

while the new parameter would extend the range of attack past the "meleerange 44", in the moment when this line of code is executed:
TNT1 A 0 A_customMeleeAttack(deal 3k6 dmg)
- as I want.

I understand that you are consern that:

somebody give A_CustomMeleeAttack some range "178" & the monster will not start his attack, ASA the player come into range "178" specified in A_CustomMeleeAttack == yes, this is what I would like to be able to do. Maybe it can be rename to overreach?


====

adding option to start different melee attack, is also a nice feature. I have Saberclaw monster (heretic) with claws and tail attack, would be nice to start with tail attack sooner, and go for claws in shorter distance.

That is basically providing meleerange2, meleerange3... time of starting some animation sequence, depends from distance to the target.
User avatar
Lagi
 
Joined: 23 Jun 2018
Location: Thou shalt alter thy beliefs with new evidence


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests