SLUDGE

forceCharacter


Syntax:

forceCharacter (thisCharacter, sX, sY);

forceCharacter (thisCharacter, thisObject);

Purpose:

Forces thisCharacter to walk to a new location on the screen, disregarding any floor which setFloor has currently set. The character will move from its current location to the new location in a straight line.

If the function call provides three parameters, the second and third parameters are assumed to be the co-ordinates of the new position (sX, sY).

If the function call provides only two parameters, the second is assumed to be an object thisObject which is already represented by a region on the screen using the addScreenRegion command. If this is the case, upon arrival at the new location the character will turn to face the direction specified in the addScreenRegion call (unless this has been set to -1).

In either of these cases, if the final co-ordinates to which the character is told to walk are (0, 0) the character will not move.

Return value:

No return value.

See also:

Object Types as Characters

addCharacter

hideCharacter

isMoving

jumpCharacter

moveCharacter

showCharacter