Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finding out what a monster is attacking #461

Closed
arunraja-hub opened this issue Jun 21, 2020 · 4 comments
Closed

Finding out what a monster is attacking #461

arunraja-hub opened this issue Jun 21, 2020 · 4 comments
Labels

Comments

@arunraja-hub
Copy link

arunraja-hub commented Jun 21, 2020

Question:
How can I find out what a monster is currently attacking in an ACS script?
My goal is to determine if the monsters are infighting and do something if they are, like open a door.

Thanks!

@Miffyli
Copy link
Collaborator

Miffyli commented Jun 21, 2020

I have not tested this, but you could use CheckActorState to check which monsters are in the "firing" state. This is commonly named "Missile", like with e.g. Imp. Another possible attack state is "Melee".

@arunraja-hub
Copy link
Author

arunraja-hub commented Jun 23, 2020

Sorry what I meant was which actors were getting attacked by a monster. If there are monsters A,B and C and A is attacking, I want to know which of the other 2, B and/or C, are getting attacked

@Miffyli
Copy link
Collaborator

Miffyli commented Jun 23, 2020

You could track actors' health (APROP_Health) with GetActorProperty and track when they change. Alas, this does not tell who was attacking them, and I have not been able to find a way to specifically hook for "actor X attacked Y with Z damage" type of thing :/

@jkterry1
Copy link
Member

jkterry1 commented Oct 7, 2024

Hey,

I'm closing this issue as it appears that the original question was answered :)

@jkterry1 jkterry1 closed this as completed Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants