adventureland icon indicating copy to clipboard operation
adventureland copied to clipboard

Figure out if a player atacks me while afk

Open ghost opened this issue 8 years ago • 1 comments

Hello everyone, thus far im doing alright in this game, but I was wondering if i could AFK efficiently in the pvp server. The point is, can I make myself target a player that atacked me instantly/after killing the mob I was on? What functions besides "get_player(name)" exist for targetting players? Thank you

ghost avatar Oct 20 '16 09:10 ghost

I just added get_target_of by the way, there's still room for internal improvement

But basically, you might just taken on anyone who targets you (you have to iterate through parent.entities yourself, get_target_of of them, if the target is you (.me), attack)

Soon, there will be "attack" events on CODE too, you will receive all nearby events in CODE

kaansoral avatar Oct 20 '16 10:10 kaansoral