I'm trying to make a builder unit for a tower defense game, and I want my builder to be able to pass through my towers without allowing the enemies to be able to pass through my towers, but I don't want my builder to be able to leave the general area of the base by climbing the cliffs around the base.
I've tried toying with the collision flags, but if a unit has -ANY- ground collision flags checked, then that unit won't be able to pass through my towers' pathing footprints. However, I want to keep my builder in its base by using cliffs and the "Unused (Land 07)" collision flag.
I need my towers to have a pathing footprint so that the enemy mobs can intelligently move through the players' defenses, so the only way for my builder to be able to move through my towers would be to give the builder a flying mover.
So, unless I've gotten something wrong here, I need a pathing blocker that only blocks flying units. I've already found the "No Fly Zones", but those are circular. I just want to make a rectangular border around each base that flying units cannot cross without placing hundreds of No Fly Zones or using triggers to leash units.
i've been trying to do that too, the only solution ive seen is by using triigers. like if unit enetes no fly zone, order unit to move back or something like that
How I'd do it is check the area the unit should be in. If it detects that there is no unit, then move the unit and make a ping to where you moved it. It may be easier if you have the builder unit in a unit group array variable.
If there are any corners to the area just make a trigger with a local boolean. Make multiple if statements where if the unit is found it sets the boolean to true. Then make one last if statement that checks the boolean if it's false, then move the unit back to the area. The event would be unit leaves region.
And what's wrong with No Fly Zones? Does it matter that they are circular? Just overlap the edges of them and it blocks the pathing just fine. Otherwise you'll just have to deal with it and make a region/trigger to leash the unit.
I just tested it, I blocked a ridge with No Fly Zones overlapping 1/4-1/3 on each side with the next No Fly Zone and it works like a charm.
I'm trying to make a builder unit for a tower defense game, and I want my builder to be able to pass through my towers without allowing the enemies to be able to pass through my towers, but I don't want my builder to be able to leave the general area of the base by climbing the cliffs around the base.
I've tried toying with the collision flags, but if a unit has -ANY- ground collision flags checked, then that unit won't be able to pass through my towers' pathing footprints. However, I want to keep my builder in its base by using cliffs and the "Unused (Land 07)" collision flag.
I need my towers to have a pathing footprint so that the enemy mobs can intelligently move through the players' defenses, so the only way for my builder to be able to move through my towers would be to give the builder a flying mover.
So, unless I've gotten something wrong here, I need a pathing blocker that only blocks flying units. I've already found the "No Fly Zones", but those are circular. I just want to make a rectangular border around each base that flying units cannot cross without placing hundreds of No Fly Zones or using triggers to leash units.
Is there really no way to block air pathing without blocking ground pathing other than the No Fly Zones? Someone has to know!
@Kynval: Go
i've been trying to do that too, the only solution ive seen is by using triigers. like if unit enetes no fly zone, order unit to move back or something like that
How I'd do it is check the area the unit should be in. If it detects that there is no unit, then move the unit and make a ping to where you moved it. It may be easier if you have the builder unit in a unit group array variable.
If there are any corners to the area just make a trigger with a local boolean. Make multiple if statements where if the unit is found it sets the boolean to true. Then make one last if statement that checks the boolean if it's false, then move the unit back to the area. The event would be unit leaves region.
@Kynval: Go
And what's wrong with No Fly Zones? Does it matter that they are circular? Just overlap the edges of them and it blocks the pathing just fine. Otherwise you'll just have to deal with it and make a region/trigger to leash the unit.
I just tested it, I blocked a ridge with No Fly Zones overlapping 1/4-1/3 on each side with the next No Fly Zone and it works like a charm.