- Joined
- Jan 23, 2017
- Messages
- 9
- Thread Author
- #1
I'm having trouble getting the actual NPC who's in combat with my player. My combat handler begins to choose a new target before I've killed the current target. Any help?
By registering with us, you'll be able to discuss, share and private message with other members of our community.
Sign up now!I'm having trouble getting the actual NPC who's in combat with my player. My combat handler begins to choose a new target before I've killed the current target. Any help?
I'm having trouble getting the actual NPC who's in combat with my player. My combat handler begins to choose a new target before I've killed the current target. Any help?
Npcs.newQuery().targeting(Players.getLocal()).results();
Nullcheck player, and probably add an action filter for attackable npcs to ignore pets etc.should return all that are targeting the player, and yeah like Qos said you can search local players target in case you have multiple wanting to attack you while you're in 1v1 situations.Code:Npcs.newQuery().targeting(Players.getLocal()).results();
Nullcheck player, and probably add an action filter for attackable npcs to ignore pets etc.
We use essential cookies to make this site work, and optional cookies to enhance your experience.