So im making a TD, and i have 2 regions, when a unit enters a region its told to go to the next one, but if you build your maze so it leads them directly to regino 2 when they are heading to region 1 , they will skip region 1 and move on.
How can i prevent this ? like setting a variable for each unit, and when it enters first region it checks for what number it has and then adds 1 , same for region 2 . ?
if you remove the energy regeneration of every unit. than allow them to have 500 energy in total. now every time a unit gets into a region you check the energy lvl. if its the right lvl than send them to the next region and set new energy lvl. if not the correct energy ignore them
While the energy method probably works, if you want to do it *cough* properly, you can either use the custom value of the units to check (set unit's custom value = target region; when unit enters region, check if the custom value is correct), or use Unit Group variables (put all units in Unit Group A; when unit enters region, check whether it belongs to Unit Group A).
The best way by far to this (in my opinion) is to queue orders. There is a function for that. It's under "Unit - Issue Order". Make sure to change "Replace Existing Orders" with "After Existing Orders".
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So im making a TD, and i have 2 regions, when a unit enters a region its told to go to the next one, but if you build your maze so it leads them directly to regino 2 when they are heading to region 1 , they will skip region 1 and move on.
How can i prevent this ? like setting a variable for each unit, and when it enters first region it checks for what number it has and then adds 1 , same for region 2 . ?
just an idea..
if you remove the energy regeneration of every unit. than allow them to have 500 energy in total. now every time a unit gets into a region you check the energy lvl. if its the right lvl than send them to the next region and set new energy lvl. if not the correct energy ignore them
cool :)
so another question, is there anyway not to show the energy in the unit ? :)
EDIT : it works, but i think i will just keep it this way and let the energy be shown, that way you know how far the unit have come, Ty Jackolas
While the energy method probably works, if you want to do it *cough* properly, you can either use the custom value of the units to check (set unit's custom value = target region; when unit enters region, check if the custom value is correct), or use Unit Group variables (put all units in Unit Group A; when unit enters region, check whether it belongs to Unit Group A).
The best way by far to this (in my opinion) is to queue orders. There is a function for that. It's under "Unit - Issue Order". Make sure to change "Replace Existing Orders" with "After Existing Orders".