getPath(number start, number end, [array<integer> ignoredCells]) → array<integer> path
Returns the shortest path between two cells start and end that avoids obstacles, if there is one, ignoring the cells contained in the array ignoredCells.
The starting cell start is never part of the resulting path. The cell end is part of the resulting path if and only if it is empty or ignored by ignoredCells.
If no path exists between the two cells, getPath returns null.
Be careful: it is possible that getPath(start, end) != getPath(end, start).
null.var path = getPath(getCell(), getCell(enemy))
mark(path, COLOR_RED) // Shows the path between me and the enemy
const path = Field.path(Fight.me.cell, enemy.cell)
Debug.mark(path, Color.RED) // Shows the path between me and the enemy
path = Field.path(Fight.me.cell, enemy.cell)
Debug.mark(path, Color.RED) # Shows the path between me and the enemy
Impossible de charger les données du jeu.
Vérifiez votre connexion et réessayez.