Jump to content

zdoom - how to use MeleeThreshold with Melee attack ?


Mewdoom

Recommended Posts

Hello guys,

it is possible to use MeleeThreshold to make the monster use its missile attack from a minimum range and also use is melee attack if he is under that range ?

the monster just try to keep get close to the player instead of use his melee attack, once he is close he use his melee attack ..

In fact, I would like to have two missile attack, one for range from 0 to 100 and the second one from, 100+ range.

Share this post


Link to post
Mewdoom said:

make the monster use its missile attack from a minimum range and also use is melee attack if he is under that range ?

the monster just try to keep get close to the player instead of use his melee attack, once he is close he use his melee attack ..

This is what monsters already normally do, and the particular range is defined by MeleeRange property. MeleeThreshold isn't needed at all.

Mewdoom said:

In fact, I would like to have two missile attack, one for range from 0 to 100 and the second one from, 100+ range.

Let it have one missile attack, and call A_JumpIfCloser in its first state to branch the attack logic depending on distance.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...