turnCharacter (thisCharacter, direction);
spinCharacter (thisCharacter, direction);
Both the turnCharacter function and spinCharacter function will turn thisCharacter to face a new direction. However, turnCharacter will make the character face in his/her new direction immediately whereas spinCharacter will make the character rotate on the spot until the new direction is reached (the rate at which this happens being the character's current spin speed). Valid values for direction are any number between 0 and 359 inclusive or one of the constants NORTH, NORTHEAST, EAST, SOUTHEAST, SOUTH, SOUTHWEST, WEST or NORTHWEST (which enumerate to 0, 45, 90, 135, 180, 225, 270 and 315 respectively).
If using turnCharacter to rotate a character, the current function will continue immediately. If using spinCharacter to rotate a character, the current function will be paused until the action is completed (pausing for a minimum of 1 frame).
No return value.
Object Types as Characters
SLUDGE and this SLUDGE documentation are copyright Hungry Software and contributors 2000-2012