User Tools

Site Tools


dragengine:modules:dragonscript:behavior_occupier

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
dragengine:modules:dragonscript:behavior_occupier [2020/11/23 16:15] – created dragonlorddragengine:modules:dragonscript:behavior_occupier [2020/11/23 16:30] – [Element Class Example] dragonlord
Line 21: Line 21:
 Element class properties have the prefix **occupier.** or **occupier(id)**. if id is not empty. Element class properties have the prefix **occupier.** or **occupier(id)**. if id is not empty.
  
-===== position ===== +This behavior does not define element properties (reserved for future expansion).
-This behavior does not define element properties.+
  
 ====== Required Behaviors ====== ====== Required Behaviors ======
Line 76: Line 75:
 end end
 </code> </code>
 +
 +In the [[https://github.com/LordOfDragons/deexamples|ExampleApp]] you can find a complete example of using this behavior:
 +  * [[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/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.
dragengine/modules/dragonscript/behavior_occupier.txt · Last modified: 2024/03/14 16:55 by dragonlord