Skip to reading
PCA Script Programming

OnTriggerExited

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

Earlier edition reference / Current 0.86.4.0 property paths > p. 329

Code example
when player leaves trigger welcome_trigger
    log(to_json(event))
end

The active player leaves an eligible trigger/interactive-region overlap.

Source table from OnTriggerExited, page 299
Common context keysUse and limits
triggerId, entityId, sceneId, playerId, event="exit"; regionId for a regionUse it for leaving a local effect area. Teleports and room changes are not guaranteed to behave like ordinary walking out of the same live volume; perform important cleanup in the owning scene/sequence too.

OnAttachPointContact#

Code example
when event OnAttachPointContact
    log(to_json(event))
end

A named attach-point watch reports entering or leaving point contact.

Source table from OnTriggerExited, page 299
Common context keysUse and limits
watchId, phase, entityId, point, targetId, targetPoint, sceneId, touching, swept, position, distance, fraction, contactRadius, dimensionFilter watchId and phase="enter" for a one-shot success. A swept contact may report enter and exit between samples. Stop the watch when its job ends and set a completion flag before awarding the result.
Page 299 of 357Permalink
Go to page