Can a monster check what its target is and do something different accordingly?
the player character in my whatsit is the same type of thing as several of the monsters and their projectiles should not be able to hurt it, and i would like them to be conscious of that and not bother trying to attack from a distance. The most basic solution is to not have them attack from a distance at all, obviously.
can a monster attack player differently than other monsters?
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Re: can a monster attack player differently than other monst
So the player is the same class as the monster?
But does it still by any chance inherit from PlayerPawn?
I know in ZScript you can check if the monster's target has a class of PlayerPawn, (or inherits from it) like this:
I don't know if there's a way to check specifically for the player though.
Still, here is an example usage:
But does it still by any chance inherit from PlayerPawn?
I know in ZScript you can check if the monster's target has a class of PlayerPawn, (or inherits from it) like this:
Code: Select all
If(Invoker.target is "PlayerPawn")
Still, here is an example usage:
Spoiler:
Re: can a monster attack player differently than other monst
ah that should work, I think, thank you! I always get held up on "if/then" sorts of things. I did not know it was possible to have the player be the same class as a monster; in this case they would just be said to be the same things.
Re: can a monster attack player differently than other monst
Neither did I, that's why I was confused actually.bimshwel wrote:I did not know it was possible to have the player be the same class as a monster;