GameMakerHelpBlog

Friday, January 5, 2007

CD Player Turtorial

This will explain the functions of CD Music in Game Maker

This functionality is only available in the registered version of Game Maker.
cd_init() Must be called before using the other functions. Should also be called when a CD is changed (or simply from time to time).
cd_present() Returns whether a CD is present in the default CD drive.
cd_number() Returns the number of tracks on the CD.
cd_playing() Returns whether the CD is playing.
cd_paused() Returns whether the CD is paused or stopped.
cd_track() Returns the number of the current track (1=the first).
cd_length() Returns the length of the total CD in milliseconds.
cd_track_length(n) Returns the length of track n of the CD in milliseconds.
cd_position() Returns the current position on the CD in milliseconds.
cd_track_position() Returns the current position in the track being played in milliseconds.
cd_play(first,last) Tells the CD to play tracks first until last. If you want to play the full CD give 1 and 1000 as arguments.
cd_stop() Stops playing.
cd_pause() Pauses the playing.
cd_resume() Resumes the playing.
cd_set_position(pos) Sets the position on the CD in milliseconds.
cd_set_track_position(pos) Sets the position in the current track in milliseconds.
cd_open_door() Opens the door of the CD player
.cd_close_door() Closes the door of the CD player.

Or if you are like me and are silly you just do

[CODE]
//in CD Create event
cd_open_door()
alarm[0]=20
[/CODE]

[CODE]
//in alarm0 event
cd_close_door()
alarm[1]=20
[/CODE]

[CODE]
//in alarm1 event
cd_open_door()
alarm[0]=20
[/CODE]

This will make it open and close again and again it is really funny :D

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home