User Tools

Site Tools


dragengine:modules:dragonscript:behavior_hitscan

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
dragengine:modules:dragonscript:behavior_hitscan [2025/05/11 10:58] dragonlorddragengine:modules:dragonscript:behavior_hitscan [2025/05/11 13:39] (current) dragonlord
Line 71: Line 71:
 This behavior adds these behavior tree actions if behavior tree is present. If behavior has non-empty identifier replace ''hitScan'' with ''hitScan(id)''. This behavior adds these behavior tree actions if behavior tree is present. If behavior has non-empty identifier replace ''hitScan'' with ''hitScan(id)''.
  
-===== hitScan.set =====+===== hitScan.update =====
  
-Set one or more hit scan parameters.+Update hit scan.
  
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
-|stop|empty string, ''clear''|Stop hit scan. If value is ''clear'' clear hit results as if no hit has been done| +|start|''circular'', ''cone'', ''rectangular'', ''rectangular.uniform''|<WRAP>Start hit scan with value type.
- +
-This is an example of using this action: +
-<code xml> +
-<action name='hitScan.set'> +
-  <parameter name='stop'>clear</parameter> +
-</action> +
-</code> +
- +
-===== hitScan.start ===== +
- +
-Start hit scans. +
- +
-^Parameter^Value^Description^ +
-|type|''circular'', ''cone'', ''rectangular'', ''rectangular.uniform''|<WRAP>Distribution shape of tests.+
   * ''circular'': Tests are arranged in a circular pattern. Set angle using ''angle''   * ''circular'': Tests are arranged in a circular pattern. Set angle using ''angle''
   * ''cone'': Tests are arranged randomly in a small cone cap. Set count using ''count''. Set angle using ''angle''. Useful for example for weapons with multiple projectiles like buck shots   * ''cone'': Tests are arranged randomly in a small cone cap. Set count using ''count''. Set angle using ''angle''. Useful for example for weapons with multiple projectiles like buck shots
Line 102: Line 88:
 |angle.horizontal|float|Horizontal opening angle in degrees (angle across width)| |angle.horizontal|float|Horizontal opening angle in degrees (angle across width)|
 |angle.vertical|float|Vertical opening angle in degrees (angle across height)| |angle.vertical|float|Vertical opening angle in degrees (angle across height)|
 +|stop|empty string, ''clear''|Stop hit scan. If value is ''clear'' clear hit results as if no hit has been done|
  
 This is an example of using this action: This is an example of using this action:
 <code xml> <code xml>
-<action name='hitScan.start'> +<action name='hitScan.update'> 
-  <parameter name='type'>cone</parameter>+  <parameter name='start'>cone</parameter>
   <parameter name='count'>10</parameter>   <parameter name='count'>10</parameter>
   <parameter name='angle'>5</parameter>   <parameter name='angle'>5</parameter>
dragengine/modules/dragonscript/behavior_hitscan.txt · Last modified: 2025/05/11 13:39 by dragonlord