Two simple questions

ultimate11

Active Member
Reaction score
25
1.How do I recognize if a spell of an ordinary unit is in cooldown or not?
2.How do i check if a unit is invulnerable or not? (I`ve do it in the past but now I`v been searching throug all boolean conditions but I cant find it)


+rep ofcourse
 

vypur85

Hibernate
Reaction score
803
1. No way. Workarounds can be tricky and unpleasant. Have not tested personally though.
2. No such boolean. You can only check the level of Invulnerability ability on the unit. But if you use trigger to make a unit invulnerable, there is no way you can check its status. Workarounds might be possible but I have not tested as well.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
you can make a timer saved as (key of unit) and just check if the time left on it is greater than 0, for the cooldown timer
 

keychup

Active Member
Reaction score
34
workarounds:
1: make a timer for the specific abilities which are in cooldown equal to the cooldown time. create a boolean saying true when the timer starts. when the timer ends set the boolean to false. then when you want to check if the ability for a unit is in cooldown, check if the boolean is true. you can use hashtables to shrink the number of variables needed for timers and booleans, but then again arduousness is inevitable.

2: if a unit is invulnerable they will not be affected by your spells. instead of checking if its invulnerable, try checking if the unit is affected or not
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top