So I have 3 units.
A creates B who creates C.
When A dies I want B to die. When B dies I want C to die. Basically I just want the unit to die if it's parent dies (or is farther away than 10 units).
To get this effect I put behaviors on B & C with instant kill effects. I put a disable validator on both behaviors that is an enumerate area with the following values:
This is the validator for B detecting it's parent (A), but the other validator is similar. CU1 & CU2 are the create unit effects.
Right now the validators detect if ANY of my units are in range 10 of the child units (B & C) instead of only their own parents.
So... why isn't this working? What am I not getting about Enumerate Area?
Decided to change the title since the enumerate area isn't working as I had hoped (yes I played with the values as you said) and now I'm looking for alternate ways of detecting if the Parent unit (creator) is dead.
Determining if the first one is dead is easy because that is the caster but for the second one you might have to add a buff via the create unit effect that recognizes unit b as the source and maybe uses the origin value to remove the buff if the source unit is dead via a Unit Filters validator
Got it, changed the way I detected this completely. I decided to go top down. I used the parents to detect the children. Each parent applies a buff that makes the unit suicide on expire of the buff. The buff is reapplied before it can expire as long as the parent unit is alive to reapply it :) This method also came with a free 10 ft. leash for the kids, which helps the effect not be OP :)
Oh & I applied a few validators ofc.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So I have 3 units.
A creates B who creates C.
When A dies I want B to die. When B dies I want C to die. Basically I just want the unit to die if it's parent dies (or is farther away than 10 units).
To get this effect I put behaviors on B & C with instant kill effects. I put a disable validator on both behaviors that is an enumerate area with the following values:
This is the validator for B detecting it's parent (A), but the other validator is similar. CU1 & CU2 are the create unit effects.
Right now the validators detect if ANY of my units are in range 10 of the child units (B & C) instead of only their own parents.
So... why isn't this working? What am I not getting about Enumerate Area?
Try setting the target location to source. Also set the include to source.
Also consider altering the include and exclude.
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
Decided to change the title since the enumerate area isn't working as I had hoped (yes I played with the values as you said) and now I'm looking for alternate ways of detecting if the Parent unit (creator) is dead.
Open to suggestions :)
Determining if the first one is dead is easy because that is the caster but for the second one you might have to add a buff via the create unit effect that recognizes unit b as the source and maybe uses the origin value to remove the buff if the source unit is dead via a Unit Filters validator
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
Got it, changed the way I detected this completely. I decided to go top down. I used the parents to detect the children. Each parent applies a buff that makes the unit suicide on expire of the buff. The buff is reapplied before it can expire as long as the parent unit is alive to reapply it :) This method also came with a free 10 ft. leash for the kids, which helps the effect not be OP :)
Oh & I applied a few validators ofc.