Skip to main content

Introduction

The RPG Action adds locking and unlocking to an Interactable RPG Object. An inventory item can be set as required for locking or unlocking the object.

"Inventory RPG Unlock Action"

Fields#

NameDescription
Can LockCan the object be locked by interaction
Unlock TextText to display when object can be unlocked
Lock TextText to display when object can be locked
Missing Object TextText to display when object required object is missing
Audio Pool ChannelName of the broadcaster channel to use with the audio ppol
Lock SoundSound to play on lock/unlock
On LockedEvent raised when the object becomes locked
On UnlockedEvent raised when the object becomes unlocked
Require ItemRequire an item to unlock object
Item IdId of the item to require
Destroy Item After UseDestroy the item after unlocking
On Missing ItemEvent raised when the required item is not in inventory
Forbid When LockedList of actions to forbid when locked
Forbid When UnlockedList of actions to forbid when unlocked
Require DetectionHide this action unless it is 'detected'
Detection ConditionCondition required to be 'detected'
Allow Detection RetryCan 'detection' be retried
Detection DelayNumber of real-world seconds between 'detection' attempts
Broadcast MessagesBroadcast messages about this action
Broadcast ChannelChannel to broadcast on
Unlock Ok FormatFormat for successful unlock message
Unlock Fail FormatFormat for failed unlock message
Lock Ok FormatFormat for lock message
Need Item FormatFormat for missing item message
On DetectedEvent raised when the action has not been 'detected'
On UndetectedEvent raised when the action has been 'detected'
Forbid When UndetectedList of actions to forbid when action has not been 'detected'
On Lock State ChangedEvent raised when interaction should be locked

Properties#

NameDescription
preventActionsList of other action to prevent
callbackCallback to invoke when using this action
lockInteractionsGet/Set interaction lock state
parameterParameter (usually string display text) to use with this action
parentGets the parent Interactable RPG Object

Methods#

NameDescription
ForceUnlockForce unlock the object
LockLock the object
OnInteractionCalledThis method is called whenever the Interaction UI is displayed
OnInteractorChangedThis method is called whenever the Current Interactor changes
UnlockUnlock the object