i know buildings can have energy such as a nexus. i also know building can attack like a photon cannon. but what i would like to do is have a building use energy to make a unit when it gets full. i know how to make it auto cast when the energy is full but how do you get it to make a unit? the cost would be like 200energy and the max amount would be 200 energy. thats easy to figure out. the idea is to have a nexus make a mineral item pick up. any help or suggestions?
see what i need to sorta figure out is how it can target the ground with no unit there to target. probably have to do something like how nukes work, no target needed its just an area.
On any effect there's one or more Location+ fields. Setting the target type to Point will make the effect not require a unit to work.
There are several options to do what you want:
Autocast a Train Unit ability with the energy cost added, which drops the unit right next to the structure;
Use an Effect-Instant ability and a Create Unit effect executing at Caster (Point/Unit doesn't matter), can also run a persistent effect to create random offsets, with the Create Unit effect executing at the Target Point of the persistent;
Use an Effect-Target ability and include the casting unit as a viable ability+autocast target. This allows other effects to target specific points, and without other input the structure will simply see itself as the target, replicating the above 2 setups. Can also be expanded to target random offsets.
Use a Spawn behaviour that is set up like the second slot for the lair but instead of training larvae you train your unit and instead of needing the queen ability buff stack you need 200 energy. As a spawn effect apply a Modify Unit effect to the caster draining the energy.
i know buildings can have energy such as a nexus. i also know building can attack like a photon cannon. but what i would like to do is have a building use energy to make a unit when it gets full. i know how to make it auto cast when the energy is full but how do you get it to make a unit? the cost would be like 200energy and the max amount would be 200 energy. thats easy to figure out. the idea is to have a nexus make a mineral item pick up. any help or suggestions?
I haven't tried this yet. But you can create an effect with the type CEffectCreateUnit. Maybe that will help you.
@Amaroq64:
see what i need to sorta figure out is how it can target the ground with no unit there to target. probably have to do something like how nukes work, no target needed its just an area.
On any effect there's one or more Location+ fields. Setting the target type to Point will make the effect not require a unit to work.
There are several options to do what you want:
Autocast a Train Unit ability with the energy cost added, which drops the unit right next to the structure;
Use an Effect-Instant ability and a Create Unit effect executing at Caster (Point/Unit doesn't matter), can also run a persistent effect to create random offsets, with the Create Unit effect executing at the Target Point of the persistent;
Use an Effect-Target ability and include the casting unit as a viable ability+autocast target. This allows other effects to target specific points, and without other input the structure will simply see itself as the target, replicating the above 2 setups. Can also be expanded to target random offsets.
Use a Spawn behaviour that is set up like the second slot for the lair but instead of training larvae you train your unit and instead of needing the queen ability buff stack you need 200 energy. As a spawn effect apply a Modify Unit effect to the caster draining the energy.
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
@Photoloss:
@DrSuperEvil:
Thanks.