Item Behavior
This component belongs to the following package:
- com.yahaha.sdk.horrorprops
This Item Behavior makes an object an item, which could be inspected, collected or used by players. You can attach the component to the root of an object.
Properties
- Name:A unique identifier for the item. This is used internally by the system.
- Label: The name of the item as it appears in the user interface.
- Icon: An image that represents the item in the UI, such as in inventories or tooltips.
- Stackable: Determines if multiple instances of the item can be grouped together. Stackable items should not have individual states. Enabled by default.
- Valid: Controls whether the item can be used. Enabled by default.
- Holdable (override): Sets whether an object is holdable, and such setting will override any default object behavior.
- Parent Object(deprecated): Previously used to set the parent object when holding the item. This option is no longer recommended due to difficulties in object selection. Only applicable if no Holdable override is set.
- Holding Offset Position: Sets the item's position relative to the main camera when held. This option is only available when Holdable is set to None.
- Holding Offset Rotation: Sets the item's rotation (in Euler angles) relative to the main camera when held. This option is nly available when Holdable is set to None.
Trigger
Events:
- com.yahaha.sdk.props.OnPutUp
- EventArgs:
- com.yahaha.sdk.props.OnPutDown
- EventArgs:
- com.yahaha.sdk.props.OnHoldShow
- EventArgs:
- com.yahaha.sdk.props.OnHoldHide
- EventArgs:
- com.yahaha.sdk.props.OnItemUsed
- EventArgs:
- com.yahaha.sdk.props.EnterInspection
- EventArgs:
- com.yahaha.sdk.props.ExitInspection
- EventArgs:
- com.yahaha.sdk.props.OnPlacedDown
- EventArgs:
Condition:
- AddToItemSlots
- Returns:
- value: boolean
- value: integer
- Returns:
- IsAddedToItemSlots
- Returns:
- value: boolean
- Returns:
Action:
- SetValid
- Description:
- make the item valid
- Description:
- SetInvalid
- Description:
- make the item invalid
- Description:
- SetColliders
- SetObjects
- SetPhysics
- DestroyItem
- Use
- Arguments:
- self: self
- Arguments: