zeepzoop 3 Share Posted July 3, 2016 I'm making a script that goes into the wilderness and I want to detect if the bot is being attacked by another player. Right now I'm getting nearest player then getting interacting character for that player to check if the bot is being attacked. Is there a better way to do this? Link to comment Share on other sites More sharing options...
Diddy 265 Share Posted July 3, 2016 i gues you could check if your player is in combat and then if the interaction character is a player or not? Link to comment Share on other sites More sharing options...
zeepzoop 3 Author Share Posted July 3, 2016 what if my character is being attacked but I am not attacking them, does it still detect the player? My script will run away and I want to know when the enemy player stops attacking as well. Link to comment Share on other sites More sharing options...
Hopewelljnj 46 Share Posted July 3, 2016 You have to do a loop through all players starting with the closest and check if they are in combat and have you as an interacting character. Link to comment Share on other sites More sharing options...
Cardozz 46 Share Posted July 4, 2016 You have to do a loop through all players starting with the closest and check if they are in combat and have you as an interacting character. Wouldn't this create a huge RAM buffer? I can imagine the memory peaking here lol Link to comment Share on other sites More sharing options...
Hopewelljnj 46 Share Posted July 4, 2016 In a crowded area yeh. But it's the only way Link to comment Share on other sites More sharing options...
zeepzoop 3 Author Share Posted July 5, 2016 You can check if they are skulled first for efficiency Link to comment Share on other sites More sharing options...
TheMcPker 74 Share Posted August 19, 2017 just check all players in the area and see if they are interacting with you + if they are within the combat range you can attack no point hopping/teleporting for someone that can't even attack you Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.