when a unit is built check for the pathing cost from the start to the end. If it returns 0 (or -1, not in front of comp at moment) then the pathing is blocked and the last placed unit is responsible.
Be aware that pathing cost does not factor in unit collision size. Big units such as Ultralisks cannot fit through 1 tile gaps. The general solution in TDs is to make sure all units have as good as 0 collision size so they can fit through the smallest gaps, or at least a 1 tile gap. I have seen many TDs fail with this and suddenly all my towers get eaten by over powered Ultralisks who give up moving due to being too big despite technically not blocking.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi, I'm making Tower Defense.
But I don't know how to make "Don't block the path." system.
Many of TD has own maze or don't require maze.
I think Entropy TD is the best answer of my problem, but there is no hint.
[Solution]
"Don't block the path." system. = Anti-block system
use "Pathing Cost"
trigger
Events
* Unit Enters/Leaves Region : Any Unit Enters (Entire map)
Conditions
* OR
- Unit Type Of Unit : Unit type of (Triggering unit)) == Tower A
- Unit Type Of Unit : Unit type of (Triggering unit)) == Tower B
- Unit Type Of Unit : Unit type of (Triggering unit)) == Tower C...
Actions
* If Then Else
- If : Pathing Cost between Points : Pathing Cost between (A) and (B) > 9999
- Then : ~
when a unit is built check for the pathing cost from the start to the end. If it returns 0 (or -1, not in front of comp at moment) then the pathing is blocked and the last placed unit is responsible.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
It is pathing cost!!!
Thank you so muchhhhhhhhhhhhhhhhhhh!
Be aware that pathing cost does not factor in unit collision size. Big units such as Ultralisks cannot fit through 1 tile gaps. The general solution in TDs is to make sure all units have as good as 0 collision size so they can fit through the smallest gaps, or at least a 1 tile gap. I have seen many TDs fail with this and suddenly all my towers get eaten by over powered Ultralisks who give up moving due to being too big despite technically not blocking.