Jump to content
  • 0

Making Enemies recognize Friendly Mobs faster


Desfar

Question

I'm working slowly on a Necromancer based mod, and one of my weapons is a mangled mess of code that features an alt fire grenade that summons a Modified Lost soul as a place holder after it explodes (Two if the grenade missed completely)
The problem is that the little summoned monster is never targeted by the enemies until after they are struck.
Is there an easier way to increase the aggro the minions may have, or recode the enemies to constantly be seeking a new valid target?
My best effort so far has been to recode the enemies to constantly go back to the spawn state so that they can reacquire a target, which doesn't seem to work.

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 1

The thing that comes to mind is using Thing_Hate, but I think that to make it work you have to give your summon a tid (be sure to give it a tid that you'll never use on anything else) and add the Thing_Hate function to every other monster.

 

There's probably a better way, but I don't know it.

Share this post


Link to post
  • 1

The issue is that monster AI will not look for fellow monsters when it lacks one. It was deemed that having monsters AI scan through the entire list of all actors in the game would be far too atrocious on performances, so they only look for the list of players, which is much more manageable since it's usually a list of only one item, so that's fine.

 

When enemy monsters fight against friendly monsters, it's just regular infighting: they've been damaged by something and set their target to that thing in response.

 

Something you could do is have your minion monsters set themselves as target to nearby monsters with some ZScript trickery. Or if you're not using ZScript for some reason, you may be able to cobble something up with A_RadiusGive, CustomInventory, and SetPointer but it'll be messy.

Share this post


Link to post
  • 0

Both answers are very solid.
I will have to experiment with them.
If its a limitation of the engine, then I will have to create separate classes of minions, some of which serve as damage sponges, and others as damage dealers.
But i will experiment with both the Zscript and the Thing_Hate functions.

Share this post


Link to post
  • 0

Another hacky idea: have it do a hitscan attack with 0 damage to aggro monsters. It could send out a "shotgun blast" of these in a very wide range during its See state. It would still induce the pain state in the monsters it hits as far as I know, and I don't think you could get rid of the blood either, but you could create an invisible actor for the "puff" so that it isn't visible when it hits the wall.

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
Answer this question...

×   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...