Skip to reading
PCA Script Programming

if_player_was_here()

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
On this page
Code example
if_player_was_here(scene)

Compatibility query for player visit history.

Returns: Boolean.

Code example
if_player_was_here("lab")

if_player_was_never_here()#

Code example
if_player_was_never_here(scene)

Compatibility query for the absence of player visit history.

Returns: Boolean.

Code example
if_player_was_never_here("lab")

if_variable()#

Code example
if_variable(name, expected = true)

Compare a runtime game variable to a value.

Returns: Boolean.

Code example
if_variable("powered", true)

This reads game variables, not a same-named local let. A direct PCA if expression is clearer for locals.

if_inventory_item_was_used()#

Code example
if_inventory_item_was_used(item)

Check the item supplied in the current interaction context.

Returns: Boolean.

Code example
if_inventory_item_was_used("key")

Possession and use are separate questions. A direct Run may have no item context.

Page 64 of 357Permalink
Go to page