I'm trying to implement an ability on a structure in my game.
Parameters:
The unit provides energy to other nearby units at the expense of its own energy
for every nearby unit that doesn't have full energy, this unit will spend 10 of its own energy to give that unit 10 energy, until it's out of energy.
I don't want to create "free" energy, so for every point of energy it gives out, it must spend 1 point of energy
I've got it working at least partially, but it's continually going off regardless of whether or not anything's in range. I can't tell if it's trying to target the caster or not.
1. the search effect needed a minimum count of 1 to not continually fire off.
2. I had to make sure that the search effect specified that the caster had to have at least 10 energy, and the target had to have some missing energy. I also required "can have energy" in the search filters as well as excluded other things that might be nearby that could accidentally be targeted, like resources
3. the set effect also had to specify both that the caster had 10 energy and that the effected unit had to have missing energy.
maybe this will help some other poor schmuck stuck in a similar position.
I'm trying to implement an ability on a structure in my game.
Parameters: The unit provides energy to other nearby units at the expense of its own energy for every nearby unit that doesn't have full energy, this unit will spend 10 of its own energy to give that unit 10 energy, until it's out of energy. I don't want to create "free" energy, so for every point of energy it gives out, it must spend 1 point of energy
Here's what I've got so far:
Behavior: Energy Share
Alignment: positive
validators: caster has 10 energy
periodic: search effect
period: .5 seconds
--Effect (search)
area 360
radius 3
max targets -1
impact location: source unit
excluded: self
validators: energy not full, caster has 10 energy
effect: set effect
--Set Effect
Effects: cost, and regen
--Cost effect
Vitals -10 Energy
Impact unit: caster
--Regen effect
Vitals +10 Energy
Validators: Caster has 10 Energy
Anyone know what I might be doing wrong here?
Thanks for your time
My current project: SCRAP (Scavenge, Collect, Reclaim, Attack, Prevail)
I've got it working at least partially, but it's continually going off regardless of whether or not anything's in range. I can't tell if it's trying to target the caster or not.
My current project: SCRAP (Scavenge, Collect, Reclaim, Attack, Prevail)
OK so I've got it implemented.
Here's what I needed:
1. the search effect needed a minimum count of 1 to not continually fire off.
2. I had to make sure that the search effect specified that the caster had to have at least 10 energy, and the target had to have some missing energy. I also required "can have energy" in the search filters as well as excluded other things that might be nearby that could accidentally be targeted, like resources
3. the set effect also had to specify both that the caster had 10 energy and that the effected unit had to have missing energy.
maybe this will help some other poor schmuck stuck in a similar position.
My current project: SCRAP (Scavenge, Collect, Reclaim, Attack, Prevail)
You may use battery ability with autocast I guess.
also try using a minimum search target. so the ability wont go off unless there is say 3 targetable units in its zone
I would use a Buff that uses a periodic Search Area effect that uses a Set Effect* that has your validators which uses two Modify Unit effects.
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