Hey, I was wondering if anyone knew how to use a unit as a resource for an ability? What I mean is, I have a hero with an ability that spawns a couple Infested Terrans. I'm wanting to have other abilities to use those Infested Terrans to do things. Such as, when X ability is used to make 1 of the Infested Terrans to move to the target unit and stun the target unit than kill the used Infested Terran. If no Infested Terrans are up, than the ability can't be used.
Any help would be great, since most of my knowledge is with triggers not data.
Thanks.
You can accomplish this with validators. Have the effect of the ability include a Enumerate Area Validator. You would then set up an area for the validator to search, like a search area effect. In this case, you would set the search filters to look for only player controlled units (uncheck Enemy, Ally, Neutral). For each unit found by the area search, you would then run another validator that checks its unit type (Infested Marine in this case). You can set the comparison so you can require the number of units found be whatever you want (Greater then X, Less then X, Equal, etc.).
Another option is to use requirements, you can create a requirement that looks for number of a given unit you control. Probably the more optimum solution.
Hey, I was wondering if anyone knew how to use a unit as a resource for an ability? What I mean is, I have a hero with an ability that spawns a couple Infested Terrans. I'm wanting to have other abilities to use those Infested Terrans to do things. Such as, when X ability is used to make 1 of the Infested Terrans to move to the target unit and stun the target unit than kill the used Infested Terran. If no Infested Terrans are up, than the ability can't be used.
Any help would be great, since most of my knowledge is with triggers not data.
Thanks.
You can accomplish this with validators. Have the effect of the ability include a Enumerate Area Validator. You would then set up an area for the validator to search, like a search area effect. In this case, you would set the search filters to look for only player controlled units (uncheck Enemy, Ally, Neutral). For each unit found by the area search, you would then run another validator that checks its unit type (Infested Marine in this case). You can set the comparison so you can require the number of units found be whatever you want (Greater then X, Less then X, Equal, etc.).
Another option is to use requirements, you can create a requirement that looks for number of a given unit you control. Probably the more optimum solution.
How are the infested terrains created?
You seem to want to use an Issue Order effect and give them a buff that determines what they do.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg