Both sides previous revisionPrevious revisionNext revision | Previous revision |
dragengine:modules:dragonscript:behavior_interactionspot [2020/11/23 16:28] – [Element Class Example] dragonlord | dragengine:modules:dragonscript:behavior_interactionspot [2024/03/14 16:54] (current) – dragonlord |
---|
| |
Elements able to occupy an interaction spot have to use the [[behavior_occupier|ECBehaviorOccupier]] behavior. Both the interaction spot and the occupier have to persist the other behavior. During restoring no notifications are triggered this way. | Elements able to occupy an interaction spot have to use the [[behavior_occupier|ECBehaviorOccupier]] behavior. Both the interaction spot and the occupier have to persist the other behavior. During restoring no notifications are triggered this way. |
| |
| <WRAP center 100%> |
| <WRAP center box 450px> |
| {{youtube>BbP-lMrr0tQ?medium}} |
| <WRAP centeralign>Behavior in action (starting at timestamp 1:28)</WRAP> |
| </WRAP> |
| </WRAP> |
| |
====== Instance Counts ====== | ====== Instance Counts ====== |
| |
====== API Documentation ====== | ====== API Documentation ====== |
[[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Scenery_1_1ECBehaviorInteractionSpot.html|ECBehaviorInteractionSpot]]. | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Scenery_1_1ECBehaviorInteractionSpot.html,ECBehaviorInteractionSpot~@#. |
| |
Since DragonScript Module Version **1.4** | Since DragonScript Module Version **1.4** |
* [[https://github.com/LordOfDragons/deexamples/blob/master/exampleApp/data/scripts/InteractionSpotExampleClass.ds|InteractionSpotExampleClass.ds]]: Element class providing an interaction spot the player can use | * [[https://github.com/LordOfDragons/deexamples/blob/master/exampleApp/data/scripts/InteractionSpotExampleClass.ds|InteractionSpotExampleClass.ds]]: Element class providing an interaction spot the player can use |
* [[https://github.com/LordOfDragons/deexamples/blob/master/exampleApp/data/scripts/BehaviorInteractToggle.ds|BehaviorInteractToggle.ds]]: Interaction behavior allowing player to toggle the animated state of an element. This behavior stores the interaction spot the player has to claim. | * [[https://github.com/LordOfDragons/deexamples/blob/master/exampleApp/data/scripts/BehaviorInteractToggle.ds|BehaviorInteractToggle.ds]]: Interaction behavior allowing player to toggle the animated state of an element. This behavior stores the interaction spot the player has to claim. |
| * [[https://github.com/LordOfDragons/deexamples/blob/master/exampleApp/data/scripts/PlayerActorClass.ds|PlayerActorClass.ds]]: Player actor class. Uses occupier behavior to safely do interactions. |
* [[https://github.com/LordOfDragons/deexamples/blob/master/exampleApp/data/scripts/PlayerActionInteractToggle.ds|PlayerActionInteractToggle.ds]]: Player action interacting with BehaviorInteractToggle. Tries to claim the assigned interaction spot and if successful moves to the spot and uses the element. Once finished releases the interaction spot. | * [[https://github.com/LordOfDragons/deexamples/blob/master/exampleApp/data/scripts/PlayerActionInteractToggle.ds|PlayerActionInteractToggle.ds]]: Player action interacting with BehaviorInteractToggle. Tries to claim the assigned interaction spot and if successful moves to the spot and uses the element. Once finished releases the interaction spot. |