The Daily Click ::. Forums ::. Klik Coding Help ::. DMc2 Help
 

Post Reply  Post Oekaki 
 

Posted By Message

Deleted User
4th October, 2005 at 20:37:03 -

Please Help me I don't know how to use DMc2 I want to play a MP3

 

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
5th October, 2005 at 02:13:53 -

Wow, really?

Okay, I'll explain anyway... Copy your MP3 to your game directory. Give it a simple name, like music1.mp3 or something. Then go to the event editor and create the next event:

- On start of level: Play MP3 Appdrive$ + Appdir$+ "music1.mp3"

Appdrive$ and Appdir$ are special values in TGF and MMF to let the game / app look in its own directory (thus where your mp3 would be).

 
Old member (~2004-2007).

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
5th October, 2005 at 05:05:50 -

The above is rather oversimplified - at the start of a frame, you need to Initialise BASS, then OpenStream. The OpenStream action needs two inputs - the name of the file (use the line that DaVince provided, or just ".\music.mp3"), then 0 for non-looping or 1 for looping.

After that's done, use PlayStream to start the music.

At the end of a frame/end of the application, you need to CloseStream and TerminateBass - otherwise either the music will keep playing after the application closes, or it'll just crash.

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

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
5th October, 2005 at 08:21:30 -

someimes not terminating bass.dll will make the game still run in the backround (ie it will be closed but you can see it in processes.
This will stop you opening ay other click game until you close it manually so it's important to mae sure you terminate it.

 
.

Deleted User
5th October, 2005 at 08:59:31 -

Thank's

 

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
5th October, 2005 at 11:10:31 -

Oh right, I forgot it a bit because I use ModFX more now... Anyway, it's not too hard as you see.

 
Old member (~2004-2007).

Adrian Silea



Registered
  28/03/2005
Points
  88
6th October, 2005 at 04:50:50 -

Made this a while ago:

http://www.martin2k.co.uk/forums/index.php?showtopic=1868

'Nuff said.

 
In every moment, pretious life is drained from our souls. It's shame that, upon the point of acknowledging this, there's nothing much left of us anymore... (Saadi Golestam)

Adrian Silea



Registered
  28/03/2005
Points
  88
6th October, 2005 at 04:50:50 -

EDIT: I swear, I didn't double-post, it simply did by itself. This was an identical thread with the one above.

Image Edited by the Author.

 
In every moment, pretious life is drained from our souls. It's shame that, upon the point of acknowledging this, there's nothing much left of us anymore... (Saadi Golestam)

Silverdrake [Draconianware]



Registered
  14/08/2005
Points
  716
16th October, 2005 at 13:34:57 -

Uh, I wouldn't use the DMC 2 object, it really is buggy.

 
If you must touch the dragon, just be wary. It'll bite your hand off.

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
16th October, 2005 at 16:49:32 -

That's a decent tutorial, Adrian, but what's wrong with using relative paths? ".\music\mymusic.mod" has always worked for me.

The DMC2 object can crash the game if not used carefully, but it's my favourite of the MOD-capable extensions that I've tried.

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

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
16th October, 2005 at 21:30:05 -

It's not that buggy, athough i will admit TGF+DMC2 is asking for your game to crash.

 
.

Adrian Silea



Registered
  28/03/2005
Points
  88
17th October, 2005 at 14:11:36 -

Thanks, David. And yeah, I admit, each time I close the application that uses DMC2, I need to use the Task Manager to end the process .

It's a good plugin though. Wouldn't have written a tutorial otherwise.

 
In every moment, pretious life is drained from our souls. It's shame that, upon the point of acknowledging this, there's nothing much left of us anymore... (Saadi Golestam)

Johan Hargne (Wartagon)

Lover Of Circys

Registered
  15/06/2003
Points
  1289

Game of the Week WinnerCROBASOFTVIP MemberPS3 OwnerWii OwnerMushroom
17th October, 2005 at 14:21:05 -

The only thing I hate about it is the way it glitches for a short moment, when it repeat the mp3-file

 
Music Composer.
http://johan.hargne.se

Crobasoft
www.crobasoft.com
   

Post Reply



 



Advertisement

Worth A Click