SetPersonVisible
From Spheriki
Make a person visible or invisible in the Sphere map engine.
Contents |
Usage
- name String. The name of the person to make visible or invisible.
- visible Boolean.
true: make the person visible,false: make the person invisible.
Examples
To make the person named "Wendy" invisible:
SetPersonVisible("Wendy", false);
And to make her visible again:
SetPersonVisible("Wendy", true);
Inside a person script (like SCRIPT_ON_ACTIVATE_TALK, see SetPersonScript() for more details), to make a person visible if they were invisible and vice versa:
var person = GetCurrentPerson(); SetPersonVisible(person, !IsPersonVisible(person));
Notes
- Persons are visible by default, so when they are within the screen view-port on a Sphere map in the Sphere map engine, they will be drawn. By setting a person to be invisible, they will not be drawn, and thus not appear.
- To check if a person is visible or not, use the IsPersonVisible() function.