Help - Search - Members - Calendar
Full Version: Adding Music
The Nexus Forums > Specific Games > Morrowind > Morrowind Plug-Ins > TES Construction Set
matmart
Can i add music to room what i created in TES.
Kevin Woodman
QUOTE(Martin199 @ Feb 14 2006, 07:49 AM) [snapback]127923[/snapback]

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.
CODE
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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.