Starttrackvar: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
XTHX2 (talk | contribs)
No edit summary
Sorry for cutting out XTHX2's contributions but this page was a bit confusing
Line 1: Line 1:
starttrackvar <gamevar>
'''starttrackvar''' <track#>


starttrackvar command is used to play a track depending on what gamevar was set. See [[starttrack]] for more information on how to make a track play. (<gamevar> has to be a number; example : gamevar TEMP 1 1, whih will play the 2 track of the episode which was set, again, see [[starttrack]] for more information.)
starttrackvar is used to change the current background music that is playing. This command works like the [[starttrack]] command but the former can accept gamevars whereas the later accepts only constants.
 
<track#> is literally the track number of the current episode (which can be detected with the [[gamevar]] [[VOLUME]]) as defined by the [[music]] command.
 
Example: this will start the music track from episode 3, level 2.
 
gamevar episode 2 0
gamevar level 1 0
getuserdef[THISACTOR].volume_number TEMP
setuserdef[THISACTOR].volume_number episode
starttrackvar level
setuserdef[THISACTOR].volume_number TEMP


[[Category:EDuke32 specific commands]]
[[Category:EDuke32 specific commands]]
[[Category:Sound manipulation]]

Revision as of 12:43, 31 July 2008

starttrackvar <track#>

starttrackvar is used to change the current background music that is playing. This command works like the starttrack command but the former can accept gamevars whereas the later accepts only constants.

<track#> is literally the track number of the current episode (which can be detected with the gamevar VOLUME) as defined by the music command.

Example: this will start the music track from episode 3, level 2.

gamevar episode 2 0
gamevar level 1 0
getuserdef[THISACTOR].volume_number TEMP
setuserdef[THISACTOR].volume_number episode
starttrackvar level
setuserdef[THISACTOR].volume_number TEMP