The playing the death animation could be done under actor events using a Unit Compare Resource Contents validator to enable the playing of the death animation.
As for respawning could you not do that in data as well? You just need to adjust the Behavior - Empty Unit to a unit lacking the resource behavior (a sapling which you could give it actor events to set it's scale over time and grow) which after a duration morphs into another tree with resources.
I've made a custom resource thats called wood. I would like to kill the unit wood once its minerals are used up. How can that be done?
I need it to be killed so the trigger event "if any unit dies" will fire.
Or just try the Remove When Empty flag of the Resource behaviour.
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
@DrSuperEvil: Go
Yes that works for removing the resource but I need it to activate the trigger event
I need that event to fire so I can respawned my resource. Also I want to play the death animation for the unit. Any other ideas?
The playing the death animation could be done under actor events using a Unit Compare Resource Contents validator to enable the playing of the death animation.
As for respawning could you not do that in data as well? You just need to adjust the Behavior - Empty Unit to a unit lacking the resource behavior (a sapling which you could give it actor events to set it's scale over time and grow) which after a duration morphs into another tree with resources.
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
I ended up using the following trigger to kill my resource unit. Thank you for your help Dr Super Evil.