Antares
Spell Reviewer
- Joined
- Dec 13, 2009
- Messages
- 982
What does this do differently than IsTerrainPathable or your other library?
(0 ratings)
IsTerrainPathable is a native that doesnt always return correct values because it doesnt consider all destructible, buildings or unit pathing. It is a shown unreliable native that spawned the likes of Rising_Dusk's IsTerrainPathable, Anitarf and Vexorian IsTerrainPathable, Nestharus' IsPathable, PathingLib and PurgeandFire's CheckWalkability.What does this do differently than IsTerrainPathable or your other library?
Are you saying this is faster because it does not flip a boolean?![]()
I see. Good to know, thanks. Make sure to add this to your description (see our resource submission rules regarding descriptions).IsTerrainPathable is a native that doesnt always return correct values because it doesnt consider all destructible, buildings or unit pathing. It is a shown unreliable native that spawned the likes of Rising_Dusk's IsTerrainPathable, Anitarf and Vexorian IsTerrainPathable, Nestharus' IsPathable, PathingLib and PurgeandFire's CheckWalkability.
Haha sorry for the weird reply before I dont know how that happened XD I guess I was trying to respond yesterday. Anyway, the reason this system and the inverted method is faster is twofold. This method of checking pathability by trying to issue a build order is much faster if the result is false. By inverting this system the result is false when the path is walkable and I believe walkable paths are more commonly checked than unwalkable paths. Secondly, thanks to BlzPauseEx and Limit construction of units, its 6.5x faster to check for with this system unwalkable paths, but PathingLib could add this method and make its walkable paths 6.5x faster to check as well. Remember the mentioned paths are the ones that are slow to check. Thirdly, it can exclude player units thanks to adding a pathing map to one of the units built and sharing control with the WALK_PLAYER to exclude that player from the search, which is the size of a cell, which is also very useful for systems like Bresenham Pathchecker since their method is built on checking a cell at a time. A pathing map on a built unit on a walkable path would cause a unit to move out of the way, but that doesnt happen with unwalkable paths. So I intentionally limited this system in an inverted way. What does PR mean, part? Maybe, but it hasnt happened yet.Okay really though how much faster is it? Because as it stands this really looks like it should be a pr for the pathing lib
There are no gameplay constants or other settings that are required for this system to work. I cant imagine any gameplay constant or setting that would cause any issues either. What I do know is that for the function IsTerrainWalkabilityOff to work, it requires that all players have shared control towards neutral passive which is handled automatically by the system.I applied this system to my map and it doesn't work. I set the objectid, I set the unit exactly the same as your demo trigger.
I suspected that an existing trigger in my map was causing error, so I tried deleting all other triggers, but that didn't work either. Do gameplay constants or other settings affect whether this system works or not?
if IsWalkabilityOff(x, y) then print X else print Y endif
?. Please clean them up a bit.Makes sense. Thank you.The IsWalkabilityOff library is clean and works as intended.
You have packaged the IsPathWalkable function with the test map. As far as I can tell, this is its own stand-alone system (that is based on someone else's library, but you modified). You can package those in the same resource or upload them separately - that's up to you. But it shouldn't be in the Demo section, because it's its own system and not for demo purposes.
The demo triggers are quite byzantine. They add unnecessary confusion to what should be a simple-to-use library. Why is this not a simpleif IsWalkabilityOff(x, y) then print X else print Y endif
?. Please clean them up a bit.
The Knight trigger message shows the inverse of what it should show.
Awaiting Update
It's totally different but it could be used in combination with that path checker. This is for merely sampling a single point to see if it is walkableWas this compared with Bresenham Pathchecker ?