Shoot: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
mNo edit summary
Jblade (talk | contribs)
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 12: Line 12:
Commands with an "e" prefix set the [[gamevar]] [[RETURN]] to the spawned projectile's [[sprite id]].
Commands with an "e" prefix set the [[gamevar]] [[RETURN]] to the spawned projectile's [[sprite id]].


Commands with a "z" prefix shoot the projectile with a z-velocity of <[[zvel]]>.  Values for <[[zvel]]> can be calculated using the [[ldist]] command.  These functions are useful for causing an [[actor]] to aim vertically at objects other than the player.  They are also important to control the vertical aim of hitscan projectiles.  In hitscan projectiles, the value works similar to sloped [[sector]]s (4096 [[build units]] = ).
Commands with a "z" prefix shoot the projectile with a z-velocity of <[[zvel]]>.  Values for <[[zvel]]> can be calculated using the [[ldist]] command.  These functions are useful for causing an [[actor]] to aim vertically at objects other than the player.  They are also important to control the vertical aim of hitscan projectiles.  In hitscan projectiles, the value works similar to sloped [[sector]]s (4096 [[build units]] = 45�).


Commands with an additional "var" suffix take [[gamevar]]s rather than constants or [[define]]d labels for their inputs.
{{varsuffix}}


[[Category:Duke3D 1.3/1.5 commands]]
[[Category:Duke3D 1.3/1.5 commands]]
[[Category:Projectile manipulation]]
[[Category:Projectile manipulation]]

Latest revision as of 23:36, 7 August 2019

shoot <tile number>
shootvar <tile number>
eshoot <tile number>
eshootvar <tile number>
zshoot <zvel> <tile number>
zshootvar <zvel> <tile number>
ezshoot <zvel> <tile number>
ezshootvar <zvel> <tile number>

Causes the current actor to fire the projectile <tile number>.

Commands with an "e" prefix set the gamevar RETURN to the spawned projectile's sprite id.

Commands with a "z" prefix shoot the projectile with a z-velocity of <zvel>. Values for <zvel> can be calculated using the ldist command. These functions are useful for causing an actor to aim vertically at objects other than the player. They are also important to control the vertical aim of hitscan projectiles. In hitscan projectiles, the value works similar to sloped sectors (4096 build units = 45�).

Commands with an additional "var" suffix take gamevars rather than constants or defined labels for their inputs. As an alternate short form, "varvar" can be dropped from these commands; for example ife serves an an alias for ifvarvare.