I've unit with behavior that search closest allied units and heal them. Heal effect - like medivac beam. BUT! It creates super amount of beams, not one per healing unit (i wana 1 - per unit). Beam actor has been created like medivac - impact point, launch point and beam, which using this points. This 3 actors creates with persistent effect - impact at target, launch at caster, beam without any termins.
Rollback Post to RevisionRollBack
OMG! New hero in 'Heroes of the Storm' is Dustin Browder. Watch here!
Ok. My unit must heal 3 (this amount can be changed in the game) closest units by medivac beams. So what I'm doing:
1. Create unit;
2. Add behavior to my unit. This behavior constant and makes periodic search of closest units for heal;
3. Create search area effect that enum maximal 3 filtered units in the X range and add persistant effect (look at 4 row);
4. Create persistent effect that lives while my haling unit alive and it deals periodic heals with periodic validators;
5. Create impact point actor with events:
Effect.MyPersistent.Start -> At target -> Create
Ref -> ::global.MyNameImpact :: Self
Effect.MyPersistent.Stop -> At target -> Destroy
6. Create launch point actor with events:
Effect.MyPersistent.Start -> At caster -> Create
Ref -> ::global.MyNameLaunch :: Self
Effect.MyPersistent.Stop -> At caster -> Destroy
7. Create beam that use my impact and launch points...
Ok... beam creating without problems... BUT! It creates on more than 3 units. Also if I have more than 1 healing unit and it dies then all beams of other healing units also destroying.
What seems to be happening is that your behavior constantly searches for targets, it may only search for 3 at a time but it keeps doing it even if there are 3 beams already attached
If you load up campaign dependencies there is already a Medivac Double Heal Beam ability, I would just duplicate and tweak that if I were you.
If you just wanna fix your's, it appears what they did is apply a behavior to each unit being healed that has a stack count of 1 so that it can't fire multiple beams on the same targett, and then the search has a limit of 3 or something like that. I don't really have the time to look through the whole thing because it looks like alot of effects. GL
When beam attached it adds buff on target, also added validator to check this buff... but beams still stacks on unit. And main problem - if healing unit dies it destroys all beams of all other healing units... why?
2Slypoos
Enum area effect has filter on units which already under beam: Exclude MyPersistentName;Target
For fixing having all the beams destroyed.
You should have a search area, the search should create persistent's, and in the beam's actor there should be a Event - Events + that destroys the actor when the persistent effect stops.
So it should look something like this....
Event - Events + (ActorCreation|Effect.MedivacHealTargetPersistent.Start; At Target|Effect.MedivacHealTargetPersistent.Stop|ActorOrphan):(|||):(AnimPlay Birth Birth PlayForever|Create|Destroy|Destroy)
If it's setup like that it shouldn't effect any other medivac beams when one of them is killed.
I've unit with behavior that search closest allied units and heal them. Heal effect - like medivac beam. BUT! It creates super amount of beams, not one per healing unit (i wana 1 - per unit). Beam actor has been created like medivac - impact point, launch point and beam, which using this points. This 3 actors creates with persistent effect - impact at target, launch at caster, beam without any termins.
OMG! New hero in 'Heroes of the Storm' is Dustin Browder. Watch here!
Could you send a screenshot of how your actor events are set up for your action/beam actor?
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
Ok. My unit must heal 3 (this amount can be changed in the game) closest units by medivac beams. So what I'm doing:
1. Create unit;
2. Add behavior to my unit. This behavior constant and makes periodic search of closest units for heal;
3. Create search area effect that enum maximal 3 filtered units in the X range and add persistant effect (look at 4 row);
4. Create persistent effect that lives while my haling unit alive and it deals periodic heals with periodic validators;
5. Create impact point actor with events:
Effect.MyPersistent.Start -> At target -> Create
Ref -> ::global.MyNameImpact :: Self
Effect.MyPersistent.Stop -> At target -> Destroy
6. Create launch point actor with events:
Effect.MyPersistent.Start -> At caster -> Create
Ref -> ::global.MyNameLaunch :: Self
Effect.MyPersistent.Stop -> At caster -> Destroy
7. Create beam that use my impact and launch points...
Ok... beam creating without problems... BUT! It creates on more than 3 units. Also if I have more than 1 healing unit and it dies then all beams of other healing units also destroying.
OMG! New hero in 'Heroes of the Storm' is Dustin Browder. Watch here!
@xxxNEARBYxxx: Go
What seems to be happening is that your behavior constantly searches for targets, it may only search for 3 at a time but it keeps doing it even if there are 3 beams already attached
If you load up campaign dependencies there is already a Medivac Double Heal Beam ability, I would just duplicate and tweak that if I were you.
If you just wanna fix your's, it appears what they did is apply a behavior to each unit being healed that has a stack count of 1 so that it can't fire multiple beams on the same targett, and then the search has a limit of 3 or something like that. I don't really have the time to look through the whole thing because it looks like alot of effects. GL
When beam attached it adds buff on target, also added validator to check this buff... but beams still stacks on unit. And main problem - if healing unit dies it destroys all beams of all other healing units... why?
2Slypoos Enum area effect has filter on units which already under beam: Exclude MyPersistentName;Target
OMG! New hero in 'Heroes of the Storm' is Dustin Browder. Watch here!
For fixing having all the beams destroyed. You should have a search area, the search should create persistent's, and in the beam's actor there should be a Event - Events + that destroys the actor when the persistent effect stops.
So it should look something like this.... Event - Events + (ActorCreation|Effect.MedivacHealTargetPersistent.Start; At Target|Effect.MedivacHealTargetPersistent.Stop|ActorOrphan):(|||):(AnimPlay Birth Birth PlayForever|Create|Destroy|Destroy)
If it's setup like that it shouldn't effect any other medivac beams when one of them is killed.
So why Medivac beams not use ActorOrphan and use Destroy at Effect stop, and as result don't kill each other?
OMG! New hero in 'Heroes of the Storm' is Dustin Browder. Watch here!
I think it might have something to do with you having used a ::global reference which tends to imply being used on everything on the map.
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
Used ::global as Blizzard used it with Medivacs... hmm may be easy way to create beam - use Action Actor? Question - how if can do?
OMG! New hero in 'Heroes of the Storm' is Dustin Browder. Watch here!
If in doubt look how the sentry does it since that is the simplest beam.
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