Wooden Staff (HandProp)
Overview
The Wooden Staff (HandProp) smart asset implements its core functionality through the following components:
- Behavior: Defines the object's name and key properties, such as attack power and interaction settings.
- Item behavior: Enables the object to be interactive, inheriting many settings from the Behavior Component.
- Dummy Holdable Component: Provides the visual representation of hands holding the object in-game.
How to use
The guide demonstrates how to use the Wooden Staff as a stackable weapon to attack a monster with health points (HP), such as the Damageable Patrol Monster.
-
Add the Wooden Staff (HandProp) smart asset from Packages > Horror Game Assets > Wooden Staff (HandProp).
-
Select the wooden staff and modify properties to fit your game's needs. In our case, we change the label, icon, and keep the rest defaults. For more information on the asset's properties, see component reference.
Note: This smart asset is ready for immediate use. Once picked up, players can attack by pressing the V key and inspect the item by pressing the I key.
-
Add the Damageable Patrol Monster asset from Packages > Horror Game Assets > Damageable Patrol Monster.
-
Select the monster and adjust the monster's properties in its Properties window. In our case, we leave the HP at the default value of 1 because the Wooden Staff's attack power is 2, allowing the monster to be defeated in one hit.
-
Enter Play Mode and pick up the Wooden Staff, stack multiple staffs if desired, and wield it to attack the monster. Observe the monster being knocked down with a single hit.