Hello!
This one will probably be tought.
A few months ago, oosyrag sent me an example of a Dijkstra algorithm to calculate path for instance and the shortest path in a tactical.
(CF : construct.net/en/forum/construct-3/how-do-i-8/create-distance-tile-164973 and the c3P example : dropbox.com/s/v56jw51ktwd70mj/bfsfloodfillexample.c3p
I managed to reuse and understand this system for my game, thanks again to him it was really nice, but today I'm stuck on the possibility to add more distances, calculate on weapon the hero is using.
Here is an example of the current in-game rendering of my game:
The blue boxes represent the movements, and the red boxes the range of the weapon (2 cases).
The problem is that the hero is supposed to be able to attack even in an inaccessible area, and there are supposed to be red squares on the left side of the mountain, like this:
But I have no idea how to handle this, I tried several things without success.
I'm coming to you with the hope that someone has an idea how to do this in a simple way, but maybe it's impossible and I should revise my whole system?
I hope that I have been clear in my explanations, and I thank you for reading me.
Edit : Just editing cause maybe it's not clear about why character should be able to attack on "forbiden" tile.
Two possibilities, some ennemis can fly and walk on colide tiles, or, like in Fire Emblem, archer can attack even if there is a wall between character, like this :