SLUDGE

getCharacterDirection


Syntax:

getCharacterDirection (thisCharacter);

Purpose:

Get the current direction faced by thisCharacter.

Return value:

If thisCharacter is represented on-screen as a character, the return value will state which of the directions specified in the character's multi-directional costume the character is facing. For example, if the character has a 4-direction costume, the return value will be 0, 1, 2 or 3 (with 0 being north) or if the character has an 8-direction costume, the return value will be 0, 1, 2, 3, 4, 5, 6 or 7 (with 0 being north). If thisCharacter isn't currently on-screen, the return value will be -1.

See also:

Object Types as Characters

addCharacter