"The latest release of ZSDX (1.9) works with Solarus 1.3."sorry I did not know. Indeed there are some examples .
I managed to create an enemy that shoots fireballs when the hero is far enough. Fireballs go straight.
The enemy fled just when the hero is approaching. If the hero is near and its back is turned , the enemy attacks like a coward.
Now what I would like to do is that the enemy only shoot when there is no obstacle in front of him.
If there is a house or a wall between the enemy and the hero , the enemy still shoots and I would like to avoid that.
I try with entity:test_obstacles(dx, dy, [layer]) but I don't really understand it.
Is this method tests the presence of an obstacle every x and y of the "vector" or simply the end point ?
What would be the right approach ?