Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Calculer la distance (en cellules) entre deux positions.
fightAction:getDistance(cellIdStart, cellIdEnd)
cellIdStart
int
cellIdEnd
local myCell = fightCharacter:getCellId() local enemyCell = fightAction:getNearestEnemy() local dist = fightAction:getDistance(myCell, enemyCell) if dist > 1 then fightAction:moveToWardCell(enemyCell) end if dist == 1 then fightDebug:print("Portée corps-à-corps !") end