Skip to reading
PCA Script Programming

set_player_input_enabled()

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Enable / Disable Player Input | Action ID: SetPlayerInputEnabled

Enable or disable player control input.

Source table from set_player_input_enabled(), page 110
Option key / fieldMeaning and accepted inputDefault
Enabled enabledExplicit on/off state for the feature or response.true

Timing. The call waits for its runtime routine to return; no additional completion wait is promised by this schema.

Code example
set_player_input_enabled({"enabled": true})

In use. Disable control during a carefully staged action and restore it on every exit path. Other locks, such as a running dialogue or cutscene, can still keep input unavailable after this action enables its own switch.

set_character_action_enabled()#

Enable / Disable Character Action | Action ID: SetCharacterActionEnabled

Enable or disable a named interaction response on a character.

Source table from set_player_input_enabled(), page 110
Option key / fieldMeaning and accepted inputDefault
Character characterIdChoose a Character Designer ID; player is a runtime alias where supported.Blank
Mouse / Trigger Action actionEventChoose the response/event to enable or disable.Blank
Enabled enabledExplicit on/off state for the feature or response.true

Timing. The call waits for its runtime routine to return; no additional completion wait is promised by this schema.

Code example
set_character_action_enabled({"characterId": "player", "actionEvent": "", "enabled": true})

In use. Disable Talk for a character who is busy, then restore it later. The event/verb selection matters: disabling one response is different from hiding the NPC or turning off all interaction.

Page 110 of 357Permalink
Go to page