Naga defense system

Level 17
Joined
Dec 12, 2021
Messages
260
Hello everyone, I'm trying to create a defense system for the naga race, well what I'm mainly looking for now is a trigger that can make my murloc slaves sacrifice themselves with an active spell when I order it, this can only be sacrificed with the coral beds or with the main structure (temple of the tides and its improvements), then these buildings are supposed to have the same ability so they can sacrifice the murloc, something similar to the human militia that when you activate it the humans run to the town hall and become militant, in this case, the ability is individual and when I select the murgul slave and activate the ability in the structure, he runs towards it and sacrifices himself in order to grant X mana to the structure (I repeat, it only works with the main base or the coral beds)
EDIT: I know this has nothing to do with a defense system, but this spell will help me give mana to the structures that will later be able to summon defensive units only using mana, so these murlocs are sacrificed as a source of mana for these structures.
 
I'd use a sacrifice system similar to undead Shade (Acolyte + Sacrificial Pit + Sacrifice ability). Create a dummy unit into which worker will get transformed.
Set training time to something low.

Pseudocode follows:

Event: Unit finishes training a unit
Condition: Unit type of Trained unit = your dummy unit
Actions:
Remove Trained unit
Set mana of Training unit to Min(Current mana of training unit + mana bonus; Maximum mana of training unit).


You can try to work around by event "Unit begins training a unit), condition " Trained unit type", wait 0.01 sec, and use this:
see the custom script part
 
Back
Top