• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Validator Question

Status
Not open for further replies.
Level 5
Joined
Oct 3, 2009
Messages
93
I added the AICasterNotInCombat Validator to the Cloak ability and no matter what I do it only lasts while the unit is attacking, is there any way to make it to where you must wait like 3 or 4 seconds after attacking to be able to be cast? I tried editing the value box in the Validator but it seemed to do nothing.

Thanks in advance
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
and no matter what I do it only lasts while the unit is attacking
If this is the case, if you invert it with a not it should then do what you are after.

If it is not doing anything, in the worst case you can try the following.

1. Ghost has behaviour that runs effect 2 when it deals damage.
2. Effact adds behaviour 3 to ghost.
3. Behaviour time expires after 4 seconds and acts as an activator for 4.
4. Validator for Cloak ability that requires the ghost not have behaviour 3 inorder to cast.

Very long winded approach and unefficient but I have a great deal of faith in it working as a backup if you can not get an "out of the box" validator type to do what you want.
 
Level 5
Joined
Oct 3, 2009
Messages
93
Thanks, I'll try it

Not to double post, but I found an easy way to do it.

I did it via triggers and just had

"X" Unit attacks

Disable "Cloak" for unit
Wait x seconds
Enable "Cloak" for unit

Seems to work fine for what I need.
 
Last edited by a moderator:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Every attack done to the unit causes a trigger thread to exist for "x" seconds. SC2's galaxy script engine can only maintain a finite number of active trigger threads at any one time. On top of these trigger threads you will also likly be using other trigger threads for other parts of the map. If the trigger thread limit is exceeded an event will fail to run a trigger causing the event to be missed. One can think of it as a non destructive buffer overflow.

Being attacked by 1 or 2 zerglings will not cause this. Being attacked by a whole army though might.
 
Status
Not open for further replies.
Top