I'm one of the co-developers of Drizen 10-Way Defense on the SC2 arcade, and one of the longstanding bugs/exploits of the map that has persisted through time has been the fact that enemies treat your units differently from your buildings. That is, they still assume that the path is open even if a unit is blocking it. Enemies will recognize buildings as walls that they need to path around but not units. This causes them to get stuck in an endless move cycle where they keep trying to ram themselves through your unit to no avail. The idea behind the map as a tower defense style game is that enemies are supposed to attack you when you wall because they realize the path is blocked and stop moving. This is the way it used to work in SC1 for both units and buildings, and they do this fine with buildings in SC2, but with units they get confused and keep trying to move through, allowing you to hold them in place while they get shot to death.
Is there an easy fix for this? I was hoping this isn't even an issue that would require complex re-scripting of pathfinding. There must be some kind of collision flag somewhere that I can just tick which will make them treat units like buildings while pathfinding so that they recognize units as walls and try to path around them. Any ideas or alternative solutions?
I could make it so that enemies collide with buildings but ignore my units altogether. However I would prefer not to do this solution because of a number of reasons.
Yes there is, you just disable unit collisions so they cannot be used to wall and can walk right past your normal units meaning that buildings are the only way to maze.
Quote:
There must be some kind of collision flag somewhere that I can just tick which will make them treat units like buildings while pathfinding so that they recognize units as walls and try to path around them. Any ideas or alternative solutions?
No such option can exist because there is a huge difference in how the pathing works. Pathing only applies to objects which interact with the path finder mesh. Since such interactions can require tessellation or merge of the mesh it is quite expensive so not suitable for units which can be in constant motion. Instead unit collisions are applied separately during movement and work in a physics based way to determine who wins. A unit will not even try to walk into a building where as a unit will try to walk through another unit. This is how Warcraft III path finding worked as well to some extent although collisions were usually handled by simply stopping movement rather than trying to push through.
StarCraft I pathing worked very different in that there was practically none. A tile was either occupied or free and that applied to both buildings and units. This resulted in a number of problems such as the notorious Dragoon running the wrong way when ordered in a group since it appeared walled in.
One work around you could try is to use the movement physics to your advantage. If you base the unit on the brutalisk movement parameters it can push enemy units as it moves. If you disable hold position command on player units (and undo it with triggers if ordered) then they cannot block such units as those units will be able to push them out the way as required.
Another work around would be to periodically check the position of every unit. If it is blocked against a unit it will not move anywhere near as significantly as if it was not. Fail too many of these tests in a row and the units are ordered to attack.
Hey guys,
I'm one of the co-developers of Drizen 10-Way Defense on the SC2 arcade, and one of the longstanding bugs/exploits of the map that has persisted through time has been the fact that enemies treat your units differently from your buildings. That is, they still assume that the path is open even if a unit is blocking it. Enemies will recognize buildings as walls that they need to path around but not units. This causes them to get stuck in an endless move cycle where they keep trying to ram themselves through your unit to no avail. The idea behind the map as a tower defense style game is that enemies are supposed to attack you when you wall because they realize the path is blocked and stop moving. This is the way it used to work in SC1 for both units and buildings, and they do this fine with buildings in SC2, but with units they get confused and keep trying to move through, allowing you to hold them in place while they get shot to death.
Is there an easy fix for this? I was hoping this isn't even an issue that would require complex re-scripting of pathfinding. There must be some kind of collision flag somewhere that I can just tick which will make them treat units like buildings while pathfinding so that they recognize units as walls and try to path around them. Any ideas or alternative solutions?
I could make it so that enemies collide with buildings but ignore my units altogether. However I would prefer not to do this solution because of a number of reasons.
Yes there is, you just disable unit collisions so they cannot be used to wall and can walk right past your normal units meaning that buildings are the only way to maze.
No such option can exist because there is a huge difference in how the pathing works. Pathing only applies to objects which interact with the path finder mesh. Since such interactions can require tessellation or merge of the mesh it is quite expensive so not suitable for units which can be in constant motion. Instead unit collisions are applied separately during movement and work in a physics based way to determine who wins. A unit will not even try to walk into a building where as a unit will try to walk through another unit. This is how Warcraft III path finding worked as well to some extent although collisions were usually handled by simply stopping movement rather than trying to push through.
StarCraft I pathing worked very different in that there was practically none. A tile was either occupied or free and that applied to both buildings and units. This resulted in a number of problems such as the notorious Dragoon running the wrong way when ordered in a group since it appeared walled in.
One work around you could try is to use the movement physics to your advantage. If you base the unit on the brutalisk movement parameters it can push enemy units as it moves. If you disable hold position command on player units (and undo it with triggers if ordered) then they cannot block such units as those units will be able to push them out the way as required.
Another work around would be to periodically check the position of every unit. If it is blocked against a unit it will not move anywhere near as significantly as if it was not. Fail too many of these tests in a row and the units are ordered to attack.
Excuse and ignore the noobish remark,
In the data module / select a unit you use in your map, go to its "unit tab" and look at the window/fields available:
In the first one you can toggle what the unit is (hero/structure/etc)
Make a bogus map (save as) to test and change all your units to structures...
Try just adding "structure" by toggling it, if it doesn't work, then
remake a new bogus map and add/toggle structure it and untoggle unit ..
etc.
Might be a waste of time.. or not?!
:)
Try making it as a building at first then just change the model? The model dosent Carrie code to make it a unit does it?
If that won't work you could figure out attachments and make a structure very small unseeable then attach a unit to it but that's hard to do.