Topic:   note   (Read 19549 times)


0 Members and 1 Guest are viewing this topic.

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • My Bandcamp
note
« on: January 30, 2011, 07:52:13 PM »
I'm using the note command to get GM to play me a song.
What's wrong with this code?

ON TIMER 50 NOTE 50 30
ON TIMER 100 NOTE 55 30
ON TIMER 150 NOTE 60 30
ON TIMER 200 NOTE 65 30
ON TIMER 250 NOTE 70 30
ON TIMER 300 NOTE 75 30

It only plays the last note.
Kirby, your pudgy buddy from dream land, is back again on the game boy®!

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: note
« Reply #1 on: January 30, 2011, 07:59:48 PM »
My guess is that it only plays one at a time. You might be calling them too fast.

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • My Bandcamp
Re: note
« Reply #2 on: January 30, 2011, 08:39:05 PM »
tried that already.
Kirby, your pudgy buddy from dream land, is back again on the game boy®!

Al Staffieri


  • GMG-er

  • **

  • no avatar

  • Posts: 452

  • I love GameMaker
Re: note
« Reply #3 on: January 31, 2011, 06:37:02 AM »
You can only have one active timer. In your code the timer keeps getting reset to a new number on each line.

Try this:
noteplayed = 0
ON TIMER 50
  noteplayed = noteplayed + 1
  SELECT CASE noteplayed
  CASE 1
    NOTE 50 30
  CASE 2
    NOTE 55 30
  CASE 3
    NOTE 60 30
  CASE 4
    NOTE 65 30
  CASE 5
    NOTE 70 30
  CASE 6
    NOTE 75 30
  END SELECT
END TIMER

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • My Bandcamp
Re: note
« Reply #4 on: January 31, 2011, 03:26:22 PM »
thanks.
Kirby, your pudgy buddy from dream land, is back again on the game boy®!

x


  • GMG-er

  • **


  • Posts: 247
Re: note
« Reply #5 on: January 31, 2011, 06:44:30 PM »
Wow, please make your avatar smaller zoo.

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • My Bandcamp
Re: note
« Reply #6 on: January 31, 2011, 07:32:37 PM »
Ok
Kirby, your pudgy buddy from dream land, is back again on the game boy®!

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • My Bandcamp
Re: note
« Reply #7 on: January 31, 2011, 07:53:48 PM »
Ok heres a game I made to show how to use the notes.
http://www.mediafire.com/?8dr8td4d7ofqxkd
I got a little carried away.
« Last Edit: January 31, 2011, 08:04:01 PM by zoo804 »
Kirby, your pudgy buddy from dream land, is back again on the game boy®!

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: note
« Reply #8 on: January 31, 2011, 08:01:30 PM »
Dead link, reupload?

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • My Bandcamp
Re: note
« Reply #9 on: January 31, 2011, 08:04:27 PM »
Ok it should work now
Kirby, your pudgy buddy from dream land, is back again on the game boy®!