This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dragengine:modules:dragonscript:behavior_vrcontroldesktop [2025/05/13 23:03] – dragonlord | dragengine:modules:dragonscript:behavior_vrcontroldesktop [2025/05/14 01:12] (current) – dragonlord | ||
---|---|---|---|
Line 27: | Line 27: | ||
====== Behavior Tree Actions ====== | ====== Behavior Tree Actions ====== | ||
- | This behavior adds these behavior tree actions if behavior tree is present. | + | This behavior adds these behavior tree actions if behavior tree is present. If behavior has non-empty identifier replace '' |
- | ===== vrhmd.check ===== | + | ===== vrControlDesktop.set ===== |
- | Check one or more VR HMD parameters. Action succeeds if all parameter value matches their respective VR HMD parameter otherwise action fails. This action is typically used as first action in a sequence to run the sequence only if a VR HMD parameter matches (or not). | + | Set one or more control desktop |
^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
- | |attached|'' | + | |interact|string|Interact with desktop. If element is absent action fails. Runs interaction with name value. If interaction with name value is absent fails action. If interaction returns false fails action. Otherwise action succeeds.| |
+ | |interact.parameters|string|Optional parameters to use with '' | ||
+ | |interactElement.assign|string|Assign desktop to [[behavior_interactelement|ECBehaviorInteractElement]] with identifier matching value string. Action fails if no element is looked at or interact element behavior is absent| | ||
+ | |||
+ | This is an example of using this action: | ||
+ | <code xml> | ||
+ | <action name=' | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== vrControlDesktop.check ===== | ||
+ | |||
+ | Check one or more control desktop parameters. Action succeeds if all parameter value matches their respective control desktop parameter otherwise action fails. This action is typically used as first action in a sequence to run the sequence only if a control desktop parameter matches (or not). | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |desktop|'' | ||
+ | |interact.name|string|Name of interaction| | ||
+ | |interact.has|'' | ||
+ | |interact.query|'' | ||
+ | |interact.parameters|string|Optional parameters to use with '' | ||
|wait| |If present action returns BTResult.running instead of BTResult.failed to wait until the checks are all fulfilled| | |wait| |If present action returns BTResult.running instead of BTResult.failed to wait until the checks are all fulfilled| | ||
Line 40: | Line 60: | ||
<code xml> | <code xml> | ||
< | < | ||
- | <action name='vrhmd.check'> | + | <action name='vrControlDesktop.check'> |
- | < | + | < |
</ | </ | ||
- | <!-- actions here run only if VR HMD is attached and usable | + | <!-- actions here run only if player |
</ | </ | ||
</ | </ | ||
Line 49: | Line 69: | ||
====== Behavior Tree Conditions ====== | ====== Behavior Tree Conditions ====== | ||
- | This behavior adds these behavior tree conditions if behavior tree is present. | + | This behavior adds these behavior tree conditions if behavior tree is present. If behavior has non-empty identifier replace '' |
- | ===== vrhmd.check ===== | + | ===== vrControlDesktop.check ===== |
- | Check one or more VR HMD parameters. Conditions returns true if all parameter value match their respective | + | Check one or more control desktop |
^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
- | |vrhmd.attached|'' | + | |desktop|'' |
+ | |vrControlDesktop.interact.name|string|Name of interaction| | ||
+ | |vrControlDesktop.interact.has|'' | ||
+ | |vrControlDesktop.interact.query|'' | ||
+ | |vrControlDesktop.interact.parameters|string|Optional parameters to use with '' | ||
This is an example of using this condition: | This is an example of using this condition: | ||
<code xml> | <code xml> | ||
<action name=' | <action name=' | ||
- | < | + | < |
- | < | + | < |
</ | </ | ||
</ | </ | ||
Line 214: | Line 238: | ||
<?xml version=' | <?xml version=' | ||
< | < | ||
- | < | + | < |
- | < | + | < |
- | <string name='bindingManager'>default</ | + | < |
+ | < | ||
+ | <string name=' | ||
+ | </ | ||
+ | < | ||
+ | <string name=' | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | <string name='vrHandPointAt'>right</ | ||
| | ||
<!-- optional: add behavior trees. default adds all behavior trees. --> | <!-- optional: add behavior trees. default adds all behavior trees. --> | ||
Line 229: | Line 263: | ||
< | < | ||
</ | </ | ||
+ | | ||
+ | <!-- set element properties. omit property prefix if used inside behavior tag --> | ||
+ | <string name=' | ||
+ | </ | ||
+ | | ||
+ | < | ||
+ | <string name=' | ||
</ | </ | ||
</ | </ |