Gamewolf3000
Member
- Reaction score
- 1
Hi, so I am trying to make a turn-based and need to be able to restrict the attacks of units, I have solved the problem with units auto attacking and running around by applying an entangling roots buff which stops them from attacking and moving as long as it is aplied. First idea that came to my mind was to put a cooldown on the attack order, but I don't think that is possible.
Secondly I tried making a trigger where a dummy ability which does no damage is used on the target you want to attack and the trigger then first changes owner of the ability using unit (to stop the player from interferring with stuff), then removes the buff from the unit and orders the ability using unit to attack the target unit. The trigger then waits for the targeted unit to take damage by checking if the hp it had when the trigger started (stored in a variable) is more than it's current hp. After that it orders an invisible unit to reaply the entangling roots effects.
The problem there is that the unit just stands there, it never attacks the target and I don't know why.
The third idea I had was to use the damage target action and just have it damage the target for damage equal to the attackers damage - targets armor. But i can't find a way to get the value of a units attack (or armor).
Anyone got any idea for how I can solve this predicament?
Secondly I tried making a trigger where a dummy ability which does no damage is used on the target you want to attack and the trigger then first changes owner of the ability using unit (to stop the player from interferring with stuff), then removes the buff from the unit and orders the ability using unit to attack the target unit. The trigger then waits for the targeted unit to take damage by checking if the hp it had when the trigger started (stored in a variable) is more than it's current hp. After that it orders an invisible unit to reaply the entangling roots effects.
The problem there is that the unit just stands there, it never attacks the target and I don't know why.
The third idea I had was to use the damage target action and just have it damage the target for damage equal to the attackers damage - targets armor. But i can't find a way to get the value of a units attack (or armor).
Anyone got any idea for how I can solve this predicament?