Sorry for bothering with my question, but a while ago I posted a question asking about Power Lines. DrSuperEvil was nice enough to provide me with his custom map about it, but sadly, I didn't really understand the mechanics about it, so I figured: "Herpety derp, I'll come up with a bright idea on my own!" So...
I figured there must be a way to validate something like:
Target Unit != Source of 'Behavior' on Caster Unit
And then:
If (Target Not Source of 'Behavior' on Caster unit, Target Not Self) -> Apply 'Behavior' to Target unit
If (Caster unit has 'Behavior', Target Not Self, Target Not Source of 'Behavior' on Caster unit) -> Apply 'Behavior' to unit
The last two I can do myself. But please, please, help me with the first one!
there is no validator for that. i wanted it for my TD too since this would make things so much easier. please check out my map Funky's TD or Char Tower Defence on Europe and tell me if that fits your requirements, i'll send you the map then.
Yeah. I checked it out. Cool concept, but sadly the distributors can supply the generators with energy too, and thats the thing i don't want to happen. And no, I cant use a Unit Type != Generator, because CC provides Unit1 with energy, which supplies Unit2 with energy, etc. Unit1 type = Unit2 Type
Not sure how you are doing Power Lines, or what is required of them - but you should be able to do it using Data (Behaviors) instead of Triggers.
I've got an idea of how you can do it, creating power that rolls through all units in the line.
Generator -
Has a Behavior ("Generate Power") by default.
"Generate Power" has a periodic effect "Search for Power Lines" and an infinite duration.
"Search for Power Lines" is a search effect with a short range (.1 should result in only adjacent buildings picking up the effect). This search effect only targets power lines (through a validator) and applys 3 Buff Behaviors "Conducting Power", "Recently Conducted" and "Powered"
"Conducting Power" is identical to "Generate Power" but does not effect units currently affected by "Recently Conducted" - and it has a brief duration (you can try .1 seconds).
"Recently Conducted" is a dummy behavior to ensure conducting lines don't infinitely conduct power. It has a brief duration equal to or slightly greater than "Conducting Power"
"Powered" has a longer duration (maybe .4 seconds) and is what your validators check for to determine if a building is connected to the power grid.
Probably more clever ways to do it, but I'm not sure. And if you needed to manage amounts of power rather than "powered or not" you may have to work with a stacking buff or something.
You can also use actual Energy, having the Generator regenerate energy and use an ability as above that transfers energy to a nearby building that transfers it further...
Sorry for bothering with my question, but a while ago I posted a question asking about Power Lines. DrSuperEvil was nice enough to provide me with his custom map about it, but sadly, I didn't really understand the mechanics about it, so I figured: "Herpety derp, I'll come up with a bright idea on my own!" So...
I figured there must be a way to validate something like:
Target Unit != Source of 'Behavior' on Caster Unit
And then:
If (Target Not Source of 'Behavior' on Caster unit, Target Not Self) -> Apply 'Behavior' to Target unit
If (Caster unit has 'Behavior', Target Not Self, Target Not Source of 'Behavior' on Caster unit) -> Apply 'Behavior' to unit
The last two I can do myself. But please, please, help me with the first one!
there is no validator for that. i wanted it for my TD too since this would make things so much easier. please check out my map Funky's TD or Char Tower Defence on Europe and tell me if that fits your requirements, i'll send you the map then.
@FunkyUserName: Go
Yeah. I checked it out. Cool concept, but sadly the distributors can supply the generators with energy too, and thats the thing i don't want to happen. And no, I cant use a Unit Type != Generator, because CC provides Unit1 with energy, which supplies Unit2 with energy, etc. Unit1 type = Unit2 Type
EDIT: I looked only at Char TD
Not sure how you are doing Power Lines, or what is required of them - but you should be able to do it using Data (Behaviors) instead of Triggers.
I've got an idea of how you can do it, creating power that rolls through all units in the line.
Generator -
Has a Behavior ("Generate Power") by default.
"Generate Power" has a periodic effect "Search for Power Lines" and an infinite duration.
"Search for Power Lines" is a search effect with a short range (.1 should result in only adjacent buildings picking up the effect). This search effect only targets power lines (through a validator) and applys 3 Buff Behaviors "Conducting Power", "Recently Conducted" and "Powered"
"Conducting Power" is identical to "Generate Power" but does not effect units currently affected by "Recently Conducted" - and it has a brief duration (you can try .1 seconds).
"Recently Conducted" is a dummy behavior to ensure conducting lines don't infinitely conduct power. It has a brief duration equal to or slightly greater than "Conducting Power"
"Powered" has a longer duration (maybe .4 seconds) and is what your validators check for to determine if a building is connected to the power grid.
Probably more clever ways to do it, but I'm not sure. And if you needed to manage amounts of power rather than "powered or not" you may have to work with a stacking buff or something.
You can also use actual Energy, having the Generator regenerate energy and use an ability as above that transfers energy to a nearby building that transfers it further...