Yvel: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Jblade (talk | contribs)
mNo edit summary
Fox (talk | contribs)
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
In a sprite that happens to be a player, yvel is the player ID of that player (to be used in conjunction with [[getplayer]] and [[setplayer]], etc.). In a projectile, yvel is the number of bounces that the projectile has left.
Since the velocity is controlled solely by the [[xvel]], the yvel is used to store other values.
 
For an APLAYER sprite, the yvel stores the ID of the player (to be used with [[setplayer]] or [[getplayer]]). Normally the value will equal zero in single-player, and in multiplayer it will range from zero to the number of players ([[multimode]]) minus one. Player spawns in the map are also given an unique yvel ID higher than that of the actual players (i.e. the lowest equals [[multimode]]).
 
For hitscan projectiles, yvel represents the picnum of the projectile used with [[shoot]] command or defined by defineprojectile (while the [[picnum]] is SHOTSPARK1 for all hitscan projectiles). For normal projectiles, yvel equals the number of bounces left.


[[Category:Sprite structure members]]
[[Category:Sprite structure members]]

Latest revision as of 17:46, 20 June 2013

Since the velocity is controlled solely by the xvel, the yvel is used to store other values.

For an APLAYER sprite, the yvel stores the ID of the player (to be used with setplayer or getplayer). Normally the value will equal zero in single-player, and in multiplayer it will range from zero to the number of players (multimode) minus one. Player spawns in the map are also given an unique yvel ID higher than that of the actual players (i.e. the lowest equals multimode).

For hitscan projectiles, yvel represents the picnum of the projectile used with shoot command or defined by defineprojectile (while the picnum is SHOTSPARK1 for all hitscan projectiles). For normal projectiles, yvel equals the number of bounces left.