So I tried to implement this with Pylons (with an autocast ability to transfer energy from the Pylon to another unit or building or another Pylon, but only if the receiving Pylon has less energy). I notice that at random a pair of Pylons would just transfer energy to each other, indefinitely until they cap out; whenever that happens it basically 'short circuits' my Pylon chain (so that ie. the Shield Battery receiving the energy from the Pylon Chain suddenly stops receiving energy until the two short circuited Pylons top up on energy). I have been using a validator with Validator Type set to Current (says Delta above; but I tried both), Validator Compare set to Greater Than, Validator Unit set to Caster, Validator Other Unit set to Target, and I've tried various values for Validator Value (ie. 0, 20, -20), trying to tell the Pylon to not send energy to another Pylon unless it has at least 20 less energy than the sending Pylon. It just doesn't work. Any idea how to fix this?
The compare other unit field disables the value field so you cannot add scale to the differences detected only if the unit has more or less energy. If you are transferring a lot of energy at once you are causing a cycle of juggling energy between the two pylons because what was once higher in energy becomes lower in energy and vice versa.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
The Target Sorts used by the searches/autocast should allow prioritization. Use a Combine validator to bundle multiple together. Maybe have a series of Unit Compare Vital validator pairs that are hard coded for certain energy thresholds when targeting other pylons. The Unit Compare Order Count and Unit Order Queue validators can determine if an ability is being used on a unit.
Is there any easy method to compare two unit's energy, or other vital, without triggers, or a rough method using lots of validators?
Basically, I want an energy link which transfers energy from the unit with more energy to the one with less, regardless of direction.
If there was a validator to check which one had more energy, it would be easy.
@Ranakastrasz: Go
use the UnitCompareVital and fill in the OtherUnit field. Use the type Delta bigger than 0 to transfer hp to the target, otherwise to caster
Ah, the other otherunit field determines what unit a comparison is made to? Useful.
What is the type delta? I was going to use a healer effect.
@Ranakastrasz: Go
delta is the difference between unit and other unit. is it positive it has more life, is it negative less life. or the other way around :d
So that is what other unit does!
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
@FunkyUserName: Go
Thank you. I had no idea you could directly compare unit vitals.
@DrSuperEvil: Go
this wasn't known?
Nope. Feel free to add it to the wiki.
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
So I tried to implement this with Pylons (with an autocast ability to transfer energy from the Pylon to another unit or building or another Pylon, but only if the receiving Pylon has less energy). I notice that at random a pair of Pylons would just transfer energy to each other, indefinitely until they cap out; whenever that happens it basically 'short circuits' my Pylon chain (so that ie. the Shield Battery receiving the energy from the Pylon Chain suddenly stops receiving energy until the two short circuited Pylons top up on energy). I have been using a validator with Validator Type set to Current (says Delta above; but I tried both), Validator Compare set to Greater Than, Validator Unit set to Caster, Validator Other Unit set to Target, and I've tried various values for Validator Value (ie. 0, 20, -20), trying to tell the Pylon to not send energy to another Pylon unless it has at least 20 less energy than the sending Pylon. It just doesn't work. Any idea how to fix this?
The compare other unit field disables the value field so you cannot add scale to the differences detected only if the unit has more or less energy. If you are transferring a lot of energy at once you are causing a cycle of juggling energy between the two pylons because what was once higher in energy becomes lower in energy and vice versa.
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
Exactly, so how can I break this? i.e. how can I implement any of the below?
1 - Prioritize channeling energy to non-pylons then to low energy pylons then to higher energy ones
2 - Find some way to use multiple validators so that I can effectively add the "value" field to it
3 - Prevent channeling energy to a pylon that's channeling energy right back
The Target Sorts used by the searches/autocast should allow prioritization. Use a Combine validator to bundle multiple together. Maybe have a series of Unit Compare Vital validator pairs that are hard coded for certain energy thresholds when targeting other pylons. The Unit Compare Order Count and Unit Order Queue validators can determine if an ability is being used on a unit.
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