(Formerly known as global function FaceLocation, which is now obsolete)
Character.FaceLocation(int x, int y, optional BlockingStyle)
Similar to the FaceCharacter function, except that this faces the character
to room co-ordinates (X,Y). This allows him to face not only other characters,
but also hotspots or anything else as well (you can get co-ordinates by
watching the co-ordinates displayed in the Room Settings mode as you move the mouse
over the room background).
If the character has Turning enabled (ie. the "Characters turn to face direction" game
option is turned on, and the character does not have the "Do not turn before walking"
option checked), then the character will turn on the spot in order to face the new direction.
In this case, the BlockingStyle parameter determines whether the script waits for the
character to finish turning (eBlock, the default) or whether the script continues immediately
and the character finishes turning later on (eNoBlock).
If the character does not have Turning enabled, he will immediately turn to face the
new direction and the BlockingStyle parameter has no effect. In this case, the screen
will not be refreshed straight away -- if you want to see the character facing his new direction
immediately, call Wait(1);
Example:
cEgo.FaceLocation(cEgo.x + 50, cEgo.y);
will make the character face to the east.
See Also: Character.FaceCharacter
|