This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dragengine:modules:dragonscript:behavior_occupier [2024/03/14 16:55] – dragonlord | dragengine:modules:dragonscript:behavior_occupier [2025/03/13 17:14] (current) – dragonlord | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{tag> | {{tag> | ||
<WRAP youarehere> | <WRAP youarehere> | ||
- | [[: | + | [[: |
</ | </ | ||
Line 8: | Line 8: | ||
====== ECBehaviorOccupier ====== | ====== ECBehaviorOccupier ====== | ||
- | |||
- | Behavior element behavior adding support to uccipy an [[behavior_interactionspot|CBehaviorInteractionSpot]]. | ||
- | |||
- | [[behavior_interactionspot|CBehaviorInteractionSpot]] defines position and orientation actors or the player have to assume to interact properly with this element. The ECBehaviorOccupier behavior provides support to claim such interaction spots. | ||
<WRAP center 100%> | <WRAP center 100%> | ||
Line 19: | Line 15: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | Behavior element behavior adding support to uccipy an [[behavior_interactionspot|CBehaviorInteractionSpot]]. | ||
+ | |||
+ | [[behavior_interactionspot|CBehaviorInteractionSpot]] defines position and orientation actors or the player have to assume to interact properly with this element. The ECBehaviorOccupier behavior provides support to claim such interaction spots. | ||
====== Instance Counts ====== | ====== Instance Counts ====== | ||
Line 26: | Line 26: | ||
====== Element Class Properties ====== | ====== Element Class Properties ====== | ||
- | Element class properties have the prefix | + | Element class properties have the prefix |
- | This behavior does not define element properties | + | ====== Events ====== |
+ | |||
+ | ===== spotClaimed ===== | ||
+ | |||
+ | Occupier claimed interaction spot. | ||
+ | |||
+ | ===== spotReleased | ||
+ | |||
+ | Occupier released interaction spot. | ||
====== Required Behaviors ====== | ====== Required Behaviors ====== | ||
+ | |||
This behavior does not required other behaviors to be present. | This behavior does not required other behaviors to be present. | ||
====== Optional Behaviors ====== | ====== Optional Behaviors ====== | ||
+ | |||
This behavior does not support optional behaviors. | This behavior does not support optional behaviors. | ||
====== Persistency ====== | ====== Persistency ====== | ||
- | This behavior does support element class to be persistable (setPersistable). Saves [[behavior_interactionspot|CBehaviorInteractionSpot]] if present. | + | |
+ | This behavior does support element class to be persistable (setPersistable). | ||
====== API Documentation ====== | ====== API Documentation ====== | ||
# | # | ||
- | Since DragonScript Module Version | + | Since DragonScript Module Version |
====== Use Cases ====== | ====== Use Cases ====== | ||
Line 82: | Line 93: | ||
end | end | ||
</ | </ | ||
+ | |||
+ | ====== Behavior Factory ====== | ||
+ | |||
+ | Using element class supporting adding behaviors the behavior can be added like this: | ||
+ | <code xml> | ||
+ | <?xml version=' | ||
+ | < | ||
+ | < | ||
+ | <!-- set element properties. omit property prefix if used inside behavior tag --> | ||
+ | <string name=' | ||
+ | </ | ||
+ | | ||
+ | <!-- for adding multiple behaviors use unique identifiers --> | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====== Live Examples ====== | ||
In the [[https:// | In the [[https:// | ||
Line 88: | Line 117: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ |