Starttrackvar: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
var suffix merge
 
Line 1: Line 1:
'''starttrackvar''' <track#>
#REDIRECT [[starttrack]]
 
starttrackvar sets the background music to <track#>, as defined for the current episode with the [[music]] command. It works like [[starttrack]], but the parameter can be a variable instead of a constant
 
 
Example: this code will cause the music to cycle through the first ten tracks defined for the current episode when the player presses the open key.  (Replace the line "actor APLAYER..." with the code below)
 
gamevar TRACK 9 0
actor APLAYER MAXPLAYERHEALTH PSTAND 0 0
 
ifhitspace ifcount 26
{
  resetcount
  addvar TRACK 1
  ifvarg TRACK 9 setvar TRACK 0
  starttrackvar TRACK
}
   
   
[[Category:EDuke32 specific commands]]
[[Category:EDuke32 specific commands]]
[[Category:Sound manipulation]]
[[Category:Sound manipulation]]

Latest revision as of 20:41, 24 February 2011

Redirect to: