User Tools

Site Tools


fire_projectile

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
fire_projectile [2025/02/09 20:05] justinfire_projectile [2025/02/22 14:35] (current) justin
Line 1: Line 1:
 ======Fire Projectile====== ======Fire Projectile======
 ---- ----
-Fires a [[projectile]] from a source [[entity]] or [[coordinate]] at a target [[entity]], [[coordinate]], or direction. If the source is an [[entity]], the target is optional and, if omitted in this case, the [[projectile]] will be fired in the direction in which the source [[entity]] is currently facing.+Fires a [[projectile]] from a source [[entity]] or [[coordinate]] at a target [[entity]], [[coordinate]], or [[cardinal_direction|direction]]. If the source is an [[entity]], the target is optional and, if omitted in this case, the [[projectile]] will be fired in the direction in which the source [[entity]] is currently facing.
  
 ====Signature:==== ====Signature:====
Line 10: Line 10:
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
 |item_id|ID of the [[item]] to fire (as defined in the [[Item Editor]]). The [[item]] must have the "Projectile" setting enabled.|[[String]]|Yes| |item_id|ID of the [[item]] to fire (as defined in the [[Item Editor]]). The [[item]] must have the "Projectile" setting enabled.|[[String]]|Yes|
-|source| |[[Entity]], [[Coordinate]]|Yes| +|source|Source [[entity]] or [[coordinate]] from which the [[projectile]] will be fired.|[[Entity]], [[Coordinate]]|Yes| 
-|target| |[[Entity]], [[Coordinate]], [[Cardinal Direction]]|No| +|target|Target [[entity]], [[coordinate]], or [[cardinal direction]] at which the [[projectile]] will be fired. A target is required if the source is a [[coordinate]]. If the source is an [[entity]] and no target is specified, the [[projectile]] will be fired in the direction in which that [[entity]] is currently facing.|[[Entity]], [[Coordinate]], [[Cardinal Direction]]|Yes/No| 
-|entity_id| |[[String]]|No|+|entity_id|Unique [[entity]] ID that the [[projectile]] will be assigned.|[[String]]|No|
  
 ====Example:==== ====Example:====
Line 18: Line 18:
 fire_projectile("ITEM_0001", entity["arrow_wall"], player); fire_projectile("ITEM_0001", entity["arrow_wall"], player);
 </code> </code>
-//Results://+//Results:// An instance of the "ITEM_0001" [[projectile]] (in this case, an arrow) is fired from the "arrow_wall" [[entity]] towards the [[player character]].
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
fire_projectile.1739160328.txt.gz · Last modified: 2025/02/09 20:05 by justin