The Nexus Forums: Adding Music - The Nexus Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Adding Music

#1 User is offline   matmart 

  • Stranger
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 14-February 06

Posted 14 February 2006 - 02:49 PM

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

#2 User is offline   Kevin Woodman 

  • Enthusiast
  • PipPip
  • Group: Members
  • Posts: 218
  • Joined: 15-January 05

Posted 14 February 2006 - 03:57 PM

View PostMartin199, on Feb 14 2006, 07:49 AM, said:

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.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Skin by Skinbox
Quality & cheap IPB skins, premade vBulletin styles, cheap Web templates and more! - Skinbox