detrs 1 Share Posted January 25 I'm extremely new to coding/scripting and I was wondering how you would go about making it flinch a mob? Like for the Holy Grail quest, the troll on the bridge. Any direction or help understanding it would be appreciated! Link to comment Share on other sites More sharing options...
xyz111 83 Share Posted January 25 (edited) 9 hours ago, detrs said: I'm extremely new to coding/scripting and I was wondering how you would go about making it flinch a mob? Like for the Holy Grail quest, the troll on the bridge. Any direction or help understanding it would be appreciated! Thinking out loud, don't scold me if this isn't the purest way. (Might also need to wait for start of tick, not sure) When the health bar of NPC is not visible: Retrieve the tile location of the NPC. Attack NPC. Use HitSplatListener to monitor when NPC is hit. Walk 2 tiles away from NPC tile (+2 or -2 to npc.getX or Y, something like that) after hitting it Edited January 25 by xyz111 Link to comment Share on other sites More sharing options...
detrs 1 Author Share Posted January 26 23 hours ago, xyz111 said: Thinking out loud, don't scold me if this isn't the purest way. (Might also need to wait for start of tick, not sure) When the health bar of NPC is not visible: Retrieve the tile location of the NPC. Attack NPC. Use HitSplatListener to monitor when NPC is hit. Walk 2 tiles away from NPC tile (+2 or -2 to npc.getX or Y, something like that) after hitting it That sounds sorta what I was thinking, but I didnt know about hitsplatlistener. Don’t have to much experience with combat related things yet. I’ll give that a try and see if I can’t get it to flinch properly. Thank you, very helpful! xyz111 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now