This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dragengine:modules:dragonscript:behavior_lookat [2025/05/02 22:05] – dragonlord | dragengine:modules:dragonscript:behavior_lookat [2025/05/13 13:57] (current) – dragonlord | ||
|---|---|---|---|
| Line 60: | Line 60: | ||
| This behavior adds these behavior tree actions if behavior tree is present. | This behavior adds these behavior tree actions if behavior tree is present. | ||
| + | |||
| + | ===== lookAt.update ===== | ||
| + | |||
| + | Update look-at. | ||
| + | |||
| + | ^Parameter^Value^Description^ | ||
| + | |interact|string|Interact with looked-at element. 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 look-at element 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=' | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| ===== lookAt.check ===== | ===== lookAt.check ===== | ||
| Line 71: | Line 87: | ||
| |lookAt.distance.greater|float|Distance to look-at element is greater than value meters| | |lookAt.distance.greater|float|Distance to look-at element is greater than value meters| | ||
| |lookAt.player|'' | |lookAt.player|'' | ||
| + | |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| | ||
| This is an example of using this action: | This is an example of using this action: | ||
| Line 96: | Line 117: | ||
| |lookAt.lookAt.distance.greater|float|Distance to look-at element is greater than value meters| | |lookAt.lookAt.distance.greater|float|Distance to look-at element is greater than value meters| | ||
| |lookAt.lookAt.player|'' | |lookAt.lookAt.player|'' | ||
| + | |lookAt.interact.name|string|Name of interaction| | ||
| + | |lookAt.interact.has|'' | ||
| + | |lookAt.interact.query|'' | ||
| + | |lookAt.interact.parameters|string|Optional parameters to use with '' | ||
| This is an example of using this condition: | This is an example of using this condition: | ||