• 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.

Ability can´t be cast on unit that is busy?

Status
Not open for further replies.
Level 10
Joined
Nov 5, 2008
Messages
536
I give an example to describe my problem:

If a hatchery/lair/hive is morphing into lair/hive, trains a queen or upgrades something, Inject can NOT be cast on it.

How can this be done?
 
Level 9
Joined
Dec 21, 2006
Messages
490
you need a combi validator on the first effect of the ability. you have to combinate them with an AND and add all possible BUSY states. as far as i know there are validators if a unit is morphing already.
another possibility would be to add a certain buff to them and only validate on this buff. easy solution would be to add the dummy buff with trigger. the complexe data solution would be to have abilities with set effects that also add the dummy buff and then issueing the order to cast the real ability
Example : morph into hive. instead of clicking on a morph ability you will click on a instant effect ability which has a set effect. one effect of the set would be to add the dummy buff to the unit, the other effect in the set would be to issue the order to actully morph into the hive.
 
Level 10
Joined
Nov 5, 2008
Messages
536
Thanks for the buff suggestion. It sounds a bit complicated but I will use it if there is no other way.

as far as i know there are validators if a unit is morphing already.

What validators determines that? (I can´t find any)
If so, I would need 1 for morhing, 1 for training and 1 for reseach ability. If the building is busy with any of these activities, the spell can NOT be casted on the building.
 
Level 10
Joined
Nov 5, 2008
Messages
536
I´ve tried a lot of validators, but no one seems to work. I thought this was a simple thing. :(

If a building is morphing, training or researching, my spell can NOT be cast on it. There must be a easy way to fix this? There must be a validator?
 
Level 10
Joined
Nov 5, 2008
Messages
536
Thanks. It works for morph. I want the spell to NOT work when the hatchery is training a Queen or researching an upgrade too. The validators do not work for that, only for morph into lair.. : /

So when my hatchery is training a Queen, I can still cast Inject on it. ANd I want it to be impossible.

Any way to make the validator work for other abilities too?

(I have no idea why it isn´t working when I research something from the hatchery)
 
Last edited:
Level 10
Joined
Nov 5, 2008
Messages
536
I found a way to make it work. I divided the research ability into smaller research abilites - each one can only research one upgrade and they are all on the same building and each one has its own validator. In this way, the UnitCompareOrderCount validator works exactly as you describe it! It works for train, morph and now research abilities, as long as research only contain 1 upgrade!

Thanks for your help
 
Status
Not open for further replies.
Top