Yvel: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Fox (talk | contribs)
No edit summary
Fox (talk | contribs)
No edit summary
Line 3: Line 3:
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 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 actual [[picnum]] member equal SHOTSPARK1 for all hitscan projectiles). For normal projectiles, yvel equals the number of bounces left.
For hitscan projectiles, yvel represents the picnum of the projectile used with [[shoot]] command or defined by defineprojectile (while the [[picnum]] member equal SHOTSPARK1 for all hitscan projectiles). For normal projectiles, yvel equals the number of bounces left.


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

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 member equal SHOTSPARK1 for all hitscan projectiles). For normal projectiles, yvel equals the number of bounces left.