The Daily Click ::. Forums ::. Klik Coding Help ::. DMC 2 The Games Factory Problem
 

Post Reply  Post Oekaki 
 

Posted By Message

Vampire Reaper



Registered
  08/02/2004
Points
  213
26th April, 2004 at 13:52:45 -

Hi, i'm askin' you for a problem with the Digital Music Control 2 for TGF 32bit Pro.
if i install the game on any other pc, the music doesn't play.i think because the path says "open stream "c:\document and settings\user\game\sound\etc..."and the pc doesn't find the path how could i fix this? THX

 

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
26th April, 2004 at 14:39:20 -

Put the music file you're trying to play in the same folder as your game, and use this expression instead:

Appdrive$ + Appdir$ + "music.mp3"


This will open 'music.mp3' in the game's folder.

 
n/a

Hagar

Administrator
Old klik fart

Registered
  20/02/2002
Points
  1692

You've Been Circy'd!Teddy Bear
26th April, 2004 at 14:43:08 -

Go

Start of level:

*Init Bass
*Stream Open "./tune.mp3" (once its in the game directory - i personally dont bother with the $appdrive etc but its good practice)
*Stream play looping = 1 (1 = loop, 0 = play once)

*End of level/game : terminate bass

 
n/a

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
26th April, 2004 at 14:43:16 -

Alternatively, just using the filename, such as "music.mp3", works as well if you have the music in the same directory as the game. (For the techies, you could use ".\music.mp3" to make it a relative path. I had better stop.)

 
http://www.davidn.co.nr - Games, music, living in America

Hagar

Administrator
Old klik fart

Registered
  20/02/2002
Points
  1692

You've Been Circy'd!Teddy Bear
26th April, 2004 at 14:46:36 -

Or read my article at klik academy...on everything...including car engines!

 
n/a

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
26th April, 2004 at 15:26:02 -

If you use relative paths, it might be messed up if another app changes the current directory. That's why it's bad practice.

 
n/a

Mr Icekirby



Registered
  18/12/2003
Points
  846
26th April, 2004 at 16:35:35 -

chenges current directory? how would that work?

 
Mr Icekirby says so!
OBEY ME!

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
26th April, 2004 at 18:28:16 -

It works like this:

_chdir("c:\\program files\\oh_noes_your_app_is_screwed_now");

 
n/a

Vampire Reaper



Registered
  08/02/2004
Points
  213
27th April, 2004 at 08:14:46 -

thx everyone

 

Kramy



Registered
  08/06/2002
Points
  1888
27th April, 2004 at 13:16:20 -

Some newer versions of windows don't support ".\". Originally I thought it was a win2k and winXP thing, but if it works on those OS's, then it might be that you have to be in administrator mode.

Edit: Appdrive$+Appdir+"name.ext" is safer.

Image Edited by the Author.

 
Kramy

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
27th April, 2004 at 17:35:28 -

i dont even bother with the ./ appdir crap

just "example.mod" in the expression editor works fine for me. has worked perfectly since TGF 32bit on my blessed Win98 machine.

its probably worth noting that certain mods dont work with DMC2. i know your running an MP3 but still its a problem which isnt wellknown.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com
   

Post Reply



 



Advertisement

Worth A Click