Levers and Interactable Objects: Difference between revisions
Jump to navigation
Jump to search
Created page with "== Levers == Linked Actors How to activate" |
No edit summary |
||
Line 1: | Line 1: | ||
== Overview == | |||
Interactable objects are defined through a C++ class in bulkobjects/psinteractableactor.cpp , this class is blueprint enabled, so you can see it from the editor. In the editor there are items you can use in Blueprints/InteractableActors. | |||
There are different types of actors like: | |||
* lights (can be turned on and off) | |||
* doors with 2 states (open / close) | |||
* doors with 3 states (open on the outside / closed / open on the inside) | |||
* gates with 2 states (open and close) , you can set the direction to be left/right/up/down. This will determine the direction the door will slide when activated | |||
* levers with 2 states (up and down). | |||
All interactable actors have these properties: | |||
* InteractDistance : player distance required to use the item | |||
* SoundOnToggle : sound played when you use the item | |||
* linkedActors : actors which will be triggered when using this item (must be also interactable actors) | |||
* DisableDirectInteraction : if set to true it prevents the player to use this item. Can be used for gates, which are triggered by a lever, and we dont want the player to be able to open the gate directly. | |||
* linkedActorsToggles : List of actors which toggled this item. We keep track of this to then toggle the final item. Example for a door requiring multiple levers to be opened, you will list here all the levers. | |||
* trapProperties: if trapped, these are the properties, see [[Traps]] | |||
== Levers == | == Levers == | ||
Revision as of 15:14, 19 December 2021
Overview
Interactable objects are defined through a C++ class in bulkobjects/psinteractableactor.cpp , this class is blueprint enabled, so you can see it from the editor. In the editor there are items you can use in Blueprints/InteractableActors.
There are different types of actors like:
- lights (can be turned on and off)
- doors with 2 states (open / close)
- doors with 3 states (open on the outside / closed / open on the inside)
- gates with 2 states (open and close) , you can set the direction to be left/right/up/down. This will determine the direction the door will slide when activated
- levers with 2 states (up and down).
All interactable actors have these properties:
- InteractDistance : player distance required to use the item
- SoundOnToggle : sound played when you use the item
- linkedActors : actors which will be triggered when using this item (must be also interactable actors)
- DisableDirectInteraction : if set to true it prevents the player to use this item. Can be used for gates, which are triggered by a lever, and we dont want the player to be able to open the gate directly.
- linkedActorsToggles : List of actors which toggled this item. We keep track of this to then toggle the final item. Example for a door requiring multiple levers to be opened, you will list here all the levers.
- trapProperties: if trapped, these are the properties, see Traps
Levers
Linked Actors
How to activate