@kharel123 Oh right, I didn't see that comment (thanks for subscribing btw).
For background music you should import a sound file with the music (just like you would with other sounds), and name it for example snd_music.
Then type the following code in the Game Start event of any object that is present at the start of the game (for example obj_control): sound_loop(snd_music);
good .......
every thing is good
you are good man
nvbism 4 weeks ago
@nvbism Why thank you :)
nusaik 4 weeks ago
very good video, learn how create a game, thanks
SahNar9 1 month ago
make more game maker tutorials please
kharel123 9 months ago
how to make a door that opens when you have the key
kharel123 9 months ago
hi how do you make a 3d shooting games please answer..
kharel123 9 months ago
@kharel123 That's really difficult to explain. I'd check YoYoGames[dot]com for a tutorial.
nusaik 9 months ago
@nusaik how do you make a load screen like a menu how to play and start game etc please reply..
kharel123 9 months ago
@kharel123 Better check YoYoGames or Google for those kind of things. You can find a lot of tutorials there.
nusaik 9 months ago
thx
kharel123 9 months ago
what about the background music.. please
kharel123 9 months ago
@kharel123 Oh right, I didn't see that comment (thanks for subscribing btw).
For background music you should import a sound file with the music (just like you would with other sounds), and name it for example snd_music.
Then type the following code in the Game Start event of any object that is present at the start of the game (for example obj_control): sound_loop(snd_music);
nusaik 9 months ago
@nusaik thanks a lot it helped :) :)
kharel123 9 months ago
i really dont get it when i finish the game the error message appear again and again?
kharel123 9 months ago
how to make enemy move up and down??
kharel123 9 months ago
@kharel123 The same way as the ones that move horizontally (in the first part of this tutorial), but replace "hspeed" with "vspeed".
nusaik 9 months ago
@nusaik thanks a lot o and what's the code to set score to zero if hit by a ghost like you have to restart the room but the score wont be 0?
kharel123 9 months ago
@kharel123 If you want the score to be 0, the code is: score=0;
If you want the score to be the same as at the beginning of the room, it's a bit more complicated but I could send you an example if you want.
nusaik 9 months ago
@nusaik sorry sorry i have asked you lot questions please dont be angry:
when you finish the game the error code appear how to make it say" game over " and how to add background song please ans
kharel123 9 months ago
@kharel123 No problem :P
Use this code (in collision event for obj_finish with obj_player):
if (room==rom_last)
{ show_message("game over"); room_goto(rom_menu);
}
else
{ room_goto_next();
}
In this example rom_last is the name of your last room, and rom_menu is the name of the main menu room.
nusaik 9 months ago
@kharel123 (YouTube messed up the code a bit but it should still work.)
nusaik 9 months ago
@nusaik thanks but how do you add background music? plus i subscribe ..
kharel123 9 months ago
@nusaik how do you add music please reply PS i subscribed your channel
kharel123 9 months ago