This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dragengine:modules:dragonscript:behavior_lookedat [2025/05/02 21:51] – [Optional Behaviors] dragonlord | dragengine:modules:dragonscript:behavior_lookedat [2025/05/04 13:47] (current) – [lookedAt.check] dragonlord | ||
|---|---|---|---|
| Line 21: | Line 21: | ||
| Element class properties have the prefix '' | Element class properties have the prefix '' | ||
| + | |||
| + | ====== Events ====== | ||
| + | |||
| + | This behavior supports adding listeners. These events can be received: | ||
| + | |||
| + | ===== actorStartsLookingAt ===== | ||
| + | |||
| + | Actors starts looking at object. | ||
| + | |||
| + | ===== actorStopsLookingAt ===== | ||
| + | |||
| + | Actors stops looking at object. | ||
| ====== Behavior Tree Actions ====== | ====== Behavior Tree Actions ====== | ||
| Line 36: | Line 48: | ||
| |count.greater|integer|Count of actors looking at element is greater than integer value| | |count.greater|integer|Count of actors looking at element is greater than integer value| | ||
| |player|'' | |player|'' | ||
| + | |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 69: | Line 82: | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | ====== State Machine Actions ====== | ||
| + | |||
| + | Same as [[# | ||
| + | |||
| + | ====== State Machine Conditions ====== | ||
| + | |||
| + | Same as [[# | ||
| + | |||
| + | ====== State Machine Events ====== | ||
| + | |||
| + | This behavior sends these state machine events. | ||
| + | |||
| + | ===== lookedAt.start ===== | ||
| + | |||
| + | Actors starts looking at object. | ||
| + | |||
| + | ===== lookedAt.stop ===== | ||
| + | |||
| + | Actors stops looking at object. | ||
| ====== Required Behaviors ====== | ====== Required Behaviors ====== | ||
| Line 82: | Line 115: | ||
| This behavior does support element class to be persistable (setPersistable). | This behavior does support element class to be persistable (setPersistable). | ||
| - | |||
| - | ====== Events ====== | ||
| - | |||
| - | This behavior supports adding listeners. These events can be received: | ||
| - | |||
| - | ===== actorStartsLookingAt ===== | ||
| - | |||
| - | Actors starts looking at object. | ||
| - | |||
| - | ===== actorStopsLookingAt ===== | ||
| - | |||
| - | Actors stops looking at object. | ||
| ====== API Documentation ====== | ====== API Documentation ====== | ||