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

Chaos monster and intelligent soldier

Recommended Posts

Is it possible to create a monster that will attack anyone, even other monsters, upon activation? It would have to have a slight target priority towards the player, but would also need no provocation from another monster to start attacking it.

On the other side, is it possible to create an enemy that behaves like a human and will not shoot hitscan attacks if any other ally monster is gonna get directly shot by it? meaning, if it's in its line of sight. ("if it's in its"? sometimes i get confused by this language lol. is that properly said?)

Share this post


Link to post
Lycaon said:

Is it possible to create a monster that will attack anyone, even other monsters, upon activation? It would have to have a slight target priority towards the player, but would also need no provocation from another monster to start attacking it.

The problem is that the monster needs some way to determine its next target. There is no way to "find all potential targets currently in line of sight of a monster", so the monster cannot pick a random target because it cannot know which potential targets to pick from. I'm not sure if swapping the monster's FRIENDLY flag during its walking animation would achieve this (perhaps combined with calling A_Look), and how much side-effect-proof would it be if it even worked. If it didn't work, it might be impossible to do.

On the other side, is it possible to create an enemy that behaves like a human and will not shoot hitscan attacks if any other ally monster is gonna get directly shot by it? meaning, if it's in its line of sight.

No, because line of sight checks are not affected by any Things between the source and the target, only by geometry.

There is a hacky workaround to prevent them from infighting anyway: Make the hitscan attack not an actual hitscan, but an invisible FastProjectile. Then set the marine's species to be the same as the ally monster's one. Then they won't infight even if the marine shot the monster or the monster shot him with non-hitscan and non-splash-damage attack. But this obviously doesn't solve the line sight check problem at all.

("if it's in its"? sometimes i get confused by this language lol. is that properly said?)

Yes, it is.

Share this post


Link to post

That's what I feared... I'll try to play around a bit with the friendly flag, see what happens. As for the soldier, would it be possible to make its hitscan bullets have no effect on other monsters? I know this is not possible through any flag, but perhaps if hitscan could have a damage type (like ice or electricity) I could make the other monsters invulnerable to that particular type of damage. Is this viable?

EDIT: I just saw your edit, which answered this post. "Back to the future" stuff going on. That's a great idea, i'll do it, thanks

Share this post


Link to post
Lycaon said:

On the other side, is it possible to create an enemy that [...] will not shoot hitscan attacks if any other ally monster is gonna get directly shot by it? meaning, if it's in its line of sight.

Try experimenting with this.

Share this post


Link to post
scifista42 said:

There is a hacky workaround to prevent them from infighting anyway: Make the hitscan attack not an actual hitscan, but an invisible FastProjectile. Then set the marine's species to be the same as the ally monster's one. Then they won't infight even if the marine shot the monster or the monster shot him with non-hitscan and non-splash-damage attack. But this obviously doesn't solve the line sight check problem at all.
Yes, it is.

You can also use custom damage types to make the monster immune to its own bullets through a damagefactor 0 for that type. And you can use a long range melee attack or A_WolfAttack to have hitscans that go directly to the target, do not go through anything else, do not pass Go, and do not collect infighting.

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
×