Hello! So, I've started working on the combat script again. I want to create two battles with two heroes, but I'm already struggling with how to optimize it. The thing is, I don't have a clear idea yet of these heroes being real "bosses" that the player only attacks. For now, they're more like regular bots with large armies, roaming around and consuming everything on the map. I want it so that when my hero attacks them, or they attack my hero, it triggers the combat script. Right now, I'm just thinking of writing the entire combat twice, once for when the player attacks and once for when they defend, but maybe there's a way to simplify this so that the game only needs to track who attacked whom once, and then use that hero's variable in all functions (like UnitCastGlobalSpell)?
I might be wrong about disabling the standard attack, but you can experiment with SetObjectEnabled and so on. There are many workarounds you can come up with. For example, you could create a loop that checks the distance between your heroes, and if the distance is 2 tiles, your hero will attack the enemy using this script... (but I wouldn't recommend this option :))
Будь яростней пред ночью всех ночей,
Не дай погаснуть свету своему!
Хоть мудрый знает – не осилишь тьму
Во мгле словами не зажжёшь лучей –
Не уходи безропотно во тьму.