GetCurrentPerson
From Spheriki
Receives the name of the "current" person. This person is known when a person script is called and the function makes writing more generic code for any person easier.
Contents |
Usage
- string returns the person's name, if possible.
Examples
Inside a person's talk script the person's name is requested.
//This is inside an On Activate (Talk) script, also known as SCRIPT_ON_ACTIVATE_TALK. window.drawWindow(10, 10, 300, 100); font.drawTextBox(10, 10, 300, 100, 0, GetCurrentPerson() + ": I'd like to say something.");
Notes
This function is only useful in context. When it is called at a point where the engine can't possibly know which character you mean, Sphere will Abort with an error.
See also
- SetPersonScript(name, which, script)
- CallPersonScript(name, which)