Is there a way or existing function that i can use to see if a certain tile is walkable.
No obstacles in the way (door, gates, ...)
Is there a way or existing function that i can use to see if a certain tile is walkable.
No obstacles in the way (door, gates, ...)
~Fre
Most doors/gates are represented by red lines on the minimap.
If you are walking via the minimap:
1) Get the destination point
2) Create a straight line from current position to destination.
3) See if there are red lines intersecting the line you created.
4) If there are, then you'll have to check to see if a door is closed. Otherwise, you're good to go.
If you are walking via the mainscreen:
1) Convert destination point on mainscreen to a point on the minimap.
2) Do the same thing as walking via minimap.
Thought there was a function called TTile.walkable():boolean I may be wrong though
There are currently 1 users browsing this thread. (0 members and 1 guests)