Flashlight and Battery (HandProp)
This smart asset belongs to the following package:
- com.yahaha.sdk.horrorgameassets
The Flashlight and Battery (HandProp) provides two collectibles: a flashlight and a battery. When holding either collectible, a dummy hand model is visible. If the flashlight runs out of power, pressing R replaces it with the battery collectible, allowing the flashlight to stay on.
Flashlight
The Flashlight is a portable light source for exploring dark areas.
Property | Description |
---|---|
Name | Enter a unique name to identify and manage the lighter easily. |
Label | Type the name displayed in-game when the player collects this lighter. |
Icon | Choose a UI icon to show when collected and in the hotbar. |
Stackable | Toggle to allow the same lighters to be stacked in a hotbar slot. Disabled by default. |
Interaction Distance | Set the distance within which the player can interact to pick up the lighter. Ranges from -1000000 to 1000000. Default: 3. |
Interactable | Toggle to allow players to interact with the flashlight within a specified distance. Enabled by default. |
Rechargeable | Allows power depletion and recharging for the item. Enabled by default and automatically disabled if the Initial Time is set to less than 0. |
Initial Time | Duration in seconds that the flashlight can be used for the first time before the power runs out. Ranges from 0 to 1000000. Default: 20. |
Power Source | Specify the name of the item that powers the flashlight. |
Model List
- Flashlight: A model of a flashlight that can be quickly swapped.
Event List
- OnPickedUp: When the item is picked up.
- OnHeld: When the item is held in hand.
- OnPackedUp: When the item is packed up into the hotbar slot.
- OnEnterInspection: When the player enters the inspection interface for this item.
- OnExitInspection: When the player exits the inspection interface for this item.
- OnLightOn: When the flashlight is on.
- OnLightOff: When the flashlight is off.
- OnTrytoTurnOn: When the player attempts to turn on the flashlight.
Condition List
- IsPickable: If the flashlight is pickable.
- IsLightOn: If the flashlight is on.
Action List
- PickUp: Add the flashlight to the player's hotbar slots.
- StartInspection: Initiate the inspection interface for the lighter.
- SetPickable: Enable players to pick up the lighter.
- SetUnpickable: Disable players from picking up the lighter.
- Switch: Turn the flashlight on or off.
Battery
The Battery is a power source to activate flashlights or other devices.
Model List
- Battery: A model of a battery that can be quickly swapped.
Event List
- OnPickedUp: When the battery is picked up.
- OnHeld: When the battery is held in hand.
- OnPackedUp: When the battery is packed up into the hotbar slot.
Condition List
- IsPickable: If the battery is pickable.
Action List
- PickUp: Add the battery to the player's hotbar slots.
- HoldInHand: Hold the battery in hand.
- SetInteractable: Set if players can interact with the battery within a specified distance.
- StartInspection: Initiate the inspection interface for the battery.
- Use: Use the battery.
- SetPickable: Enable players to pick up the battery.
- SetUnpickable: Disable players from picking up the battery.
note
The main difference between Flashlight and Battery and Flashlight and Battery (HandProp) is that the latter includes a dummy hand model capable of holding the collectible. This is implemented using components such as Dummy Holdable Component, Upper Body Action, Equippable Item, and others.