Locked Door and Key
This smart asset belongs to the following package:
- com.yahaha.sdk.horrorgameassets
The Locked Door and Key consists of two smart assets: the Door and the Key.
Door
The Door is a door that opens when a key-like item is inserted.
Attributes | Description |
---|---|
Interaction Distance | Distance from which the openable unlocked door can be triggered to open. |
Open Time | Time in seconds to fully open the openable unlocked door. |
Close Time | Time in seconds to fully close the openable unlocked door. |
Open Angle | Angle change for the openable unlocked door to rotate when opened. |
Handle Interact Distance | Distance from which the handle can be triggered. |
Handle1 Rotation Angle | Angle change for the door handle1 when rotated. |
Handle2 Rotation Angle | Angle change for the door handle2 when rotated. |
Handle1 Rotation Time | Time in seconds to rotate the door handle1. |
Handle2 Rotation Time | Time in seconds to rotate the door handle2. |
Key Insert Distance | Distance from which the key can be inserted into the keyhole. |
Required Item | Enter the item name to unlock the door. |
Key Rotation Time | Time in seconds needed to rotate the key to unlock the door. |
Key Rotation Angle | Angle change for the key to rotate when unlocking the door. Positive values rotate clockwise. |
Events and Actions
Events
- OnOpened: When the unlocked door is opened.
- OnClosed: When the unlocked door is closed.
Conditions
- IsOpen: If the unlocked door is open.
Actions
- Open: Open the unlocked door.
- Close: Close the unlocked door.
Key
The Key is an item to gather for overall progress.
Attributes | Description |
---|---|
Name | Enter a unique name to identify and manage the key easily. |
Label | Type the name displayed in-game when the player collects this key. |
Icon | Choose a UI icon to show when collected and in the hotbar. |
Stackable | Toggle to allow the same batteries to be stacked in a hotbar slot. |
Interaction Distance | Set the distance within which the player can interact to pick up the key. |
Hold Offset Postion | Set the key position offset relative to the bone point when being held in hand. |
Hold Offset Rotation | Set the key position offset relative to the bone point when being held in hand. |
Interactable | Toggle to allow players to interact with the key within a specified distance. |
Pick Up Audio | Select the audio to be played upon pickup. |
Events and Actions
Events
- OnPickedUp: When the key is picked up.
- OnHeld: When the key is held in hand.
- OnPackedUp: When the key is packed up into the hotbar slot.
- OnEnterInspection: When the player enters the inspection interface for this key.
- OnExitInspection: When the player exits the inspection interface for this key.
- OnPlacedDown: When the key is placed down.
Conditions
- IsPickable: If the key is pickable.
Actions
- PickUp: Add the key to the player's hotbar slots.
- HoldInHand: Hold the key in hand.
- SetInteractable: Set if players can interact with the key within a specified distance.
- StartInspection: Initiate the inspection interface for the key.
- Use: Use the key.
- SetPickable: Enable players to pick up the key.
- SetUnpickable: Disable players from picking up the key.