I'm trying to make an Ability given to a unit, which when pressed, searches the unit's surroundings for other recently (killed within 30 seconds) killed units and essentially revives (or create) those dead units. I've added a Death Time of 30 seconds to all units, created a "Search Area" effect with the Search Filter set to Required: Dead as well as a Search: Area with a radius of 10.
I've also made a "Create Unit" effect to 'create/revive' the recently killed units. I'm just unsure to how to get the Create Unit effect to create the units found by the Search Area effect. I assume the Search Unit effect stores it's findings somewhere, but not sure how to access those findings/data and use it to create the unit.
Hey DrSuperEvil, I didn't use an Issue Order effect. Essentially I made a Search Effect that looks for dead units, make a Create unit effect apply to the found, dead target through the (Basic) Search: Area + field.
Your solution worked, when I made the fallback unit the Target, I got the recently killed unit to respawn. I guess my mistake was that I assumed that since I selected the Create Unit effect to be applied to the dead unit( the Target) in my search area, I didn't have to specify that the fallback unit is the target unit of the search area.
Remember to remove the corpses using a Damage type effect afterwards.
Alright this is embarrassing BUT I'm going to need some help with this as well. I've be giving it a try for a while now with badresults.
To remove the corpse I used a Set Effect ( Raise Dead Set) with the Effect: Effects+ being a Damage effect. (Raise Dead Damage). I then went back to my Search Area Effect (Raise Dead Search) and added it to the list of effect that are to be applied to my search target; dead units.
While the creation/reviving of the killed unit worked, removing the corpse doesn't.
What's weird though is I think my Damage effect works because if I give the Damage (or Set) effect priority over the Create Unit Effect when listing the effects applied to target in my search areas, no unit is created. I'm assuming this is due to the search finding a corpse, then deleting it first before it's found again to be created.
I've also tried to simply use a Damage Effect without going through a Set effect but no changes in results. I've added a few images hoping they can help make my question clearer. Thanks
1 of my Search Area list of effect, 1 of my Set Effect, 1 of the Damage Effect, and one of the ability showing that it should run all 4 effects.
I think that should work. I've gotten the Simple Actor to destroy the ::Main actor and prevent unit spawn, but only if I choose the (Any) sub name for the actor creation.
The problem with that though is that since I'm using the effect used to Create Unit Effect / revive the dead unit to create the Simple Actor, I need the simple actor to be created at the end of of the Create Unit Effect (Sub name .Stop) ; leaving the sub name as Any results in no unit being created in the first place. As you probably have guessed, any other sub name will still results in the unit being spawned again if I were to use the 'raise dead' ability.
Actually I had tried that since yes I am still using the damage effect, but it still didn't work :/. Using the ability twice in a row still result in a unit being spawned when it shouldn't the second time.
The only difference I had noticed was when I was using the create unit effect with the sinple actor and it yielded the results I mentioned in my previous comments.
Well IF you're still interested, I've included a map with the latest ability ( Raise Dead) , effects (Raise Dear Search, Raise Dead Create and Raise Dead Damage) and Simple Actor (Raise Dead Actor) to this post.
The unit with the ability is an Adept duplicate ( called " Mage ") and I chose to revive a Marine simply called "Soldier".
Thanks for the help, let me know if you find something.