stopCharacter() Function Reference

stopCharacter(string name[, boolean immediate = false])

Clears a characters movement queue. Useful for stopping a character mid-journey, for example when bumping into an NPC that initiates combat.

By default, the characters current movement is allowed to complete to prevent stopping mid-tile. The optional "immediate" parameter can be used to override this, which might be useful for quickly changing direction for example.