| 08-22-2008, 07:08 PM | #1 |
Is there a way to check if a unit is stunned? I was thinking to check for the buff but there are 2, " Stunned " & " Stunned (Pause) " and I'm not sure which one to use. IsUnitStunned or somthing would be ideal. |
| 08-22-2008, 07:26 PM | #2 |
Well, stunned pause is 'BPSE' i believe, you can check by viewing the raw data of both buffs in the editor. The other is 'BSTN', which is the most frequent use. To check if the unit is stunned use: JASS:function IsUnitStunned takes unit u returns boolean return GetUnitAbilityLevel(u, 'BSTN') > 0 or GetUnitAbilityLevel(u, 'BPSE') > 0 endfunction that will check if either buff is on that unit, though bstn is the norm. It would be better to just straight out check with an if (GetUnitAbility... + the other stuff), but thats up to you (less function calls). |
| 08-23-2008, 05:34 AM | #3 |
If you use the custom stun system in your database, I think it would be easy to check. But that would require triggering all your stuns. |
