I am trying to give a unit an ability which instantly adds a buff to any enemy structure which comes into vision. It currently instantly adds the buff to the first structure that comes into vision, but it stops there.
If I manually cast it on the other buildings it works... but it refuses to automatically do it. Any thoughts? Why doesn't it cast it on every building?
Okay I think I figured out the main issue. All I had to do was add a validator to make sure the targeted unit didn't already have the buff (I guess it was just casting it over and over on the same unit). It works pretty well now, but I would still like to know if there is a way to make it more instant. Right now it takes about a fourth or fifth of a second between casts and I would like it to cast on every possible unit at the same time.
Is it supposed to passively affect any structure that comes into range or is the player supposed to activate the ability once to affect all structures in range at the time of casting?
For the passive effect copy the Mothership cloaking field, that works without an Ability data entity. For the active cast start with an Effect-Instant ability that applies a Search effect, which in turn applies the target debuff. I can't think of a multiplayer ability that works like that, but the Castanar Hybrid's Constricting Slime does exactly this in the campaign. For an active cast that persists for some time, copy Guardian Shield.
The updating frequency is set by the Phase parameter on the main caster buff/persistent effect, it can be as low as 1/16th of a second but that causes lag if a large number of units is updated at once (the now-patched "Mothership lag")
I am trying to give a unit an ability which instantly adds a buff to any enemy structure which comes into vision. It currently instantly adds the buff to the first structure that comes into vision, but it stops there.
If I manually cast it on the other buildings it works... but it refuses to automatically do it. Any thoughts? Why doesn't it cast it on every building?
Here is a link to the map:
https://dl.dropbox.com/u/49867307/SC2%20Maps/visiontestmap.SC2Map
Would really appreciate any help... I feel like I am just missing something obvious.
Okay I think I figured out the main issue. All I had to do was add a validator to make sure the targeted unit didn't already have the buff (I guess it was just casting it over and over on the same unit). It works pretty well now, but I would still like to know if there is a way to make it more instant. Right now it takes about a fourth or fifth of a second between casts and I would like it to cast on every possible unit at the same time.
Is it supposed to passively affect any structure that comes into range or is the player supposed to activate the ability once to affect all structures in range at the time of casting?
For the passive effect copy the Mothership cloaking field, that works without an Ability data entity. For the active cast start with an Effect-Instant ability that applies a Search effect, which in turn applies the target debuff. I can't think of a multiplayer ability that works like that, but the Castanar Hybrid's Constricting Slime does exactly this in the campaign. For an active cast that persists for some time, copy Guardian Shield.
The updating frequency is set by the Phase parameter on the main caster buff/persistent effect, it can be as low as 1/16th of a second but that causes lag if a large number of units is updated at once (the now-patched "Mothership lag")
Or use a Behavior ability that is always on and not toggleable.
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
Use a search area effect to cast it on every unit that meets the criteria you want at the same time.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Thank you guys very much for your help. I have it all working nice and fancy now.