GetTalkDistance

From Spheriki

Jump to: navigation, search

Grab the distance the player needs to be from an NPC to trigger its ON_ACTIVATE_TALK script event.


Contents

Usage

number GetTalkDistance();
  • number is returned, which is the number of pixels that the talk distance is set to.


Examples

var distance = GetTalkDistance();

The variable distance can now be used to determine how close or far the player-controlled person in the map engine needs to be from an NPC to "talk" to it.


Notes

  • The "talk distance" is a property of the Sphere map engine, so no person needs to be provided to this function. This talk distance is used to determine how close an NPC needs to be when the player presses the talk activation key in order to trigger the ON_ACTIVATE_TALK script.


See also

Personal tools