IsInputAttached
From Spheriki
Returns true if input is attached to a person.
Contents |
[edit]
Usage
boolean IsInputAttached();
- boolean is returned.
trueif input is attached,falseotherwise.
[edit]
Examples
A simple script to temporarily remove input control.
if (IsInputAttached()) {
var person = GetInputPerson();
DetachInput();
// Do cutscene stuff here...
AttachInput(person);
}
The script uses IsInputAttached() to see if the player can move. If they can, the input person is saved, and the input detached. Any cutscene code goes in after this. After that, control is restored using AttachInput(), applied to the same person from which it was removed.
[edit]
Notes
- When this returns
true, the player is able to move around using their configured keys. This control is only offered automatically while the map engine is running.
[edit]

