Add 'creep.underAttack'



  • Hey, I know something similar has been discussed previously, but is there any reason why we can't have a simple boolean property for creeps that is 'true' when a creep is attacked on a tick. The user script could then add the creep to a list in memory for further action.

    It seems like this would make sense for both simplicity of scripting and server load.



  • To correct my original post, I didn't mean to limit it only to creeps. It'd be just as useful for structures, including roads and walls.

    Also, in an ideal world we'd also be able to tell what creep is doing the attacking, but I'll take what I can get haha.



  • We indeed plan to soon implement an API with a similar functionality of events that took place in the last tick, and not just for an attack, but for other events too.



  • Awesome! Thanks for your reply!



  • Just curious, but if you added a line to the end of your creeps. Wouldn't that get you 99% of the way there?
    creep.memory.underAttack = creep.memory.hits > creep.hits;
    creep.memory.hits = creep.hits;