CalcHeroMoveCost()

Syntax

CalcHeroMoveCost(heroName, x, y, floorID = -1);

heroName – the hero’s name x, y – the target tile’s coordinates floorID – the floor number (-1 by default, which means the floor in which the hero is located)

Description

This function calculates the hero’s movement cost to the specified point, using movement points as the calculating unit. If the floor is not specified, the one in which the hero is currently located is used. This function can only be invoked for heroes controlled by the AI players. Only static objects are taken into account when the path is formed. If the specified point can’t be reached, the function returns -1.

scripting/advmap/calcheromovecost.txt · Last modified: 2007/06/25 23:53 by sfidanza
Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0