Is there anyway in ACS to check if a monster is awake?
I'm trying to write a script that removes a monster if its dormant, but leaves it alone if it's been woken up. But for the life of me I can't find any way to return whether the monster is awake or not!
Anyone any ideas?
Check if a monster is awake in ACS
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!)
-
-
- Posts: 1446
- Joined: Fri Dec 29, 2017 4:15 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Manjaro Linux
- Location: Siberia (UTC+7)
Re: Check if a monster is awake in ACS
Are you targeting Zandronum?
Because if not, this thing can be done in ZScript, and ZScript can be called from ACS.
Because if not, this thing can be done in ZScript, and ZScript can be called from ACS.
-
-
- Posts: 17934
- Joined: Fri Jul 06, 2007 3:22 pm
Re: Check if a monster is awake in ACS
For pure ACS, as I said on Doomworld, I suggest putting a TID on the player and then using APROP_TargetTID to find out if they target the player.
-
-
- Posts: 1446
- Joined: Fri Dec 29, 2017 4:15 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Manjaro Linux
- Location: Siberia (UTC+7)
Re: Check if a monster is awake in ACS
Monsters can target other monsters, too.
Also, I didn't check APROP_TargetTID, but actor's Target is non-null for dead monsters, so health check is needed.
Also, I didn't check APROP_TargetTID, but actor's Target is non-null for dead monsters, so health check is needed.