GetPersonDirection

From Spheriki

Jump to: navigation, search

This function can get the direction a specific person is standing in. It uses the direction names as used in the spriteset.


Contents

Usage

string GetPersonDirection(person);
  • person The person to check on, defined by its name.
  • string is returned, containing the name of the direction the person is using at the moment of calling the function.


Examples

var dir = GetPersonDirection("Pete");
Abort(dir + "\n");

Gets the direction the person "Pete" is using, and then closes down the game, showing what direction Pete was in.


Notes

  • As spritesets can have custom directions like "idle", "laughing", "whatever", GetPersonDirection() can also return one of those if the person is using such a direction.


See also

Personal tools