This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dragengine:modules:dragonscript:behavior_customcolor [2025/03/11 19:54] – dragonlord | dragengine:modules:dragonscript:behavior_customcolor [2025/05/04 13:39] (current) – dragonlord | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{tag> | {{tag> | ||
<WRAP youarehere> | <WRAP youarehere> | ||
- | [[: | + | [[: |
</ | </ | ||
Line 78: | Line 78: | ||
Selected color changed. Use behavior to get the newly set color. | Selected color changed. Use behavior to get the newly set color. | ||
+ | |||
+ | ====== Behavior Tree Actions ====== | ||
+ | |||
+ | This behavior adds these behavior tree actions if behavior tree is present. If behavior has non-empty identifier replace '' | ||
+ | |||
+ | ===== customColor.set ===== | ||
+ | |||
+ | Set one or more force field parameters. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |color|'' | ||
+ | |||
+ | This is an example of using this action: | ||
+ | <code xml> | ||
+ | <action name=' | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== customColor.check ===== | ||
+ | |||
+ | Check one or more force field parameters. Action succeeds if all parameter value matches their respective force field parameter otherwise action fails. This action is typically used as first action in a sequence to run the sequence only if a force field parameter matches (or not). | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |color.red.less|float|Red color component is less than float value| | ||
+ | |color.red.greater|float|Red color component is greater than float value| | ||
+ | |color.green.less|float|Green color component is less than float value| | ||
+ | |color.green.greater|float|Green color component is greater than float value| | ||
+ | |color.blue.less|float|Blue color component is less than float value| | ||
+ | |color.blue.greater|float|Blue color component is greater than float value| | ||
+ | |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: | ||
+ | <code xml> | ||
+ | < | ||
+ | <action name=' | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <!-- actions here run only if all color components are less than 0.5 --> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====== Behavior Tree Conditions ====== | ||
+ | |||
+ | This behavior adds these behavior tree conditions if behavior tree is present. If behavior has non-empty identifier replace '' | ||
+ | |||
+ | ===== customColor.check ===== | ||
+ | |||
+ | Check one or more force field parameters. Conditions returns true if all parameter value match their respective force field parameter. This condition is typically used to run an action or sequence of actions as long as force field conditions are true. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |customColor.color.red.less|float|Red color component is less than float value| | ||
+ | |customColor.color.red.greater|float|Red color component is greater than float value| | ||
+ | |customColor.color.green.less|float|Green color component is less than float value| | ||
+ | |customColor.color.green.greater|float|Green color component is greater than float value| | ||
+ | |customColor.color.blue.less|float|Blue color component is less than float value| | ||
+ | |customColor.color.blue.greater|float|Blue color component is greater than float value| | ||
+ | |||
+ | This is an example of using this condition: | ||
+ | <code xml> | ||
+ | <action name=' | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====== State Machine Actions ====== | ||
+ | |||
+ | Same as [[# | ||
+ | |||
+ | ====== State Machine Conditions ====== | ||
+ | |||
+ | Same as [[# | ||
+ | |||
+ | ====== State Machine Events ====== | ||
+ | |||
+ | This behavior sends these state machine events. If behavior has non-empty identifier replace '' | ||
+ | |||
+ | ===== customColor.color ===== | ||
+ | |||
+ | Color changed. | ||
====== Required Behaviors ====== | ====== Required Behaviors ====== |