Jump to content

Adding Music


matmart

Recommended Posts

Can i add music to room what i created in TES.

 

First put a MP3 into the music folder, and an activator in the cell with a script

 

if you want the song to repeat, use a timer to reset.

begin music_script

float timer
short playonce

if ( playonce == 0 )
 streammusic "your mp3 file.mp3"
 set playonce to 1
endif

if ( playonce == 1 )
 set timer to ( timer + getsecondspassed )
 if ( timer >= 120 ) ; 120 being the length of song in seconds
set playonce to 0
set timer to 0
 endif
endif

end

 

If you use a subfolder in the music folder use

streammusic "subfolder\musicfile.mp3"

 

i think you can also use midi files.

 

there are limitaions though, for one, the music will stream at full volume, and if you start fighting the battle music will override.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...