GML Pathfinding and masks

Bee

Member
Okay I solved my last issue by myself after posting... maybe I can do that again! Fingers crossed.

I'll try to explain my problem. The background is generated from tiles, and then overtop of that are mask tiles to prevent anyone walking through the "solid" objects that are drawn on the tiles (like trees and houses). My party members and enemies are on pathfinding to find their way around obstacles. The problem is when I add the mask object to the obstacle grid it thinks they need to avoid walking through the whole object and not just the mask part. So of course they aren't moving at all! The enemies are wandering fine, but that's because their wander state doesn't use pathfinding. Just a generic go here sometimes, go there sometimes. They avoid the mask just fine that way.

Any ideas? Worst case I can see is somehow adding obstacle objects to match up with the masks, which I'm not even sure how to do right now but may be able to figure it out. Does anyone have any thoughts?
 

Joe Ellis

Member
the pathfinding script or algorithm your using is not using masks, only the bounding boxes or something, I'd either change the pathfinding method or use single blocks instead of a big mask

let me know if you think this isnt the case, i could have a look at your project file and try to work out what the problem is
 
Top