Yvel

From EDukeWiki
Revision as of 17:46, 20 June 2013 by Fox (talk | contribs)
Jump to navigation Jump to search

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