Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Mewdoom

Zdoom difference between a_custommeleeattack and A_MeleeAttack ?

Recommended Posts

Hello guys,

I wonder what is the difference between a_custommeleeattack and A_MeleeAttack ?

Does the first one have to be specified for each melee attack vs the other that is just the keyword and the damage, sound, etc have to be specified with damagevalue, damagesound properties ?

I read on zdoom page the damagevalue is depreciated, so I should replace all A_MeleeAtttack with A_CustomMeleeAttack ?

Share this post


Link to post
Mewdoom said:

I wonder what is the difference between a_custommeleeattack and A_MeleeAttack ?

Does the first one have to be specified for each melee attack vs the other that is just the keyword and the damage, sound, etc have to be specified with damagevalue, damagesound properties ?

You've correctly answered your own question.

Mewdoom said:

I read on zdoom page the damagevalue is depreciated, so I should replace all A_MeleeAtttack with A_CustomMeleeAttack ?

Yes, you should avoid using A_MeleeAtttack and prefer using A_CustomMeleeAttack. Generic/flexible features are usually favored over specialized/inflexible features, which is why some of the specialized/inflexible ones get deprecated.

Share this post


Link to post

To give more detail, A_MeleeAttack is just leftover cruft from the initial DECORATE implementation which had no good handling of function arguments, but of course it has to remain to ensure that old mods keep working.

Share this post


Link to post

I see :)

Plus, I notice that we can add random damage with CustomMeleeAttack, that bring the game more interesting :)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×