Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

MP3 Error

A note for the moderators: If this is in the wrong area, please move it. This topic includes both Scripting and Eventing so I wasn't sure which to put it in.

Once again I am having problems with my MP3 Player and I am starting to think this is more trouble that it is worth. ':| Anyways, I am designing a MP3 Player for my game. It uses items, a common event, events, and some basic scripting.

These are the changes I made to the pre-programed scripts:

In Scene_Title after all of the pre-made objects:
Code:
$game_mp3 = []
In Scene Save after all of the marshal dump files:
Code:
Marshal.dump($game_mp3.file)
In Scene Load after all of the marshal load files:
Code:
$game_mp3 = Marshal.load(file)

The common event uses a series of conditional branches that use the script: $game_mp3.include?(Item_ID) to check for songs (the songs were made in the items menu) before displaying a menu, so that if you don't have any songs in a particular catigory, it won't show that catigory.

For Example:

Code:
Conditional Branch: $game_mp3.include?(035)
  Conditional Branch: $game_mp3.include?(036)
    Conditional Branch: $game_mp3.include?(037)
      Conditional Branch: $game_mp3.include?(038)
         Label:Battle Music Menu
         Show choices: Battle #1, Battle #2, Battle #3, Battle #4
           When: Battle #1:
              Play BGM: Battle 01 100;100
              Jump to label: Battle Music Menu
           When: Battle #2:
              Play BGM: Battle 02 100;100
              Jump to label: Battle Music Menu
           When: Battle #3:
              Play BGM: Battle 03 100;100
              Jump to label: Battle Music Menu
           When: Battle #4:
              Play BGM: Battle 04 100;100
              Jump to label: Battle Music Menu
      else:
         Label: Battle Music Menu
          Show choices: Battle #1, Battle #2, Battle #3
           When: Battle #1:
              Play BGM: Battle 01 100;100
              Jump to label: Battle Music Menu
           When: Battle #2:
              Play BGM: Battle 02 100;100
              Jump to label: Battle Music Menu
           When: Battle #3:
              Play BGM: Battle 03 100;100
              Jump to label: Battle Music Menu
    else:
      Conditional Branch: $game_mp3.include?(038)
         Label: Battle Music Menu
         Show Choices: Battle #1, Battle #2, Battle #4
           When Battle #1:
              Play BGM: Battle 01 100;100
              Jump to label: Battle Music Menu
           When Battle #2:
              Play BGM: Battle 02 100;100
              Jump to label: Battle Music Menu
           When Battle #4:
              Play BGM Battle 04 100;100
       else:
          Label: Battle Music Menu
          Show Choices: Battle #1, Battle #2
             When Battle #1
                Play BGM: Battle 01 100;100
                Jump to label: Battle Music Menu
             When Battle #2
                Play BGM: Battle 02 100;100
                Jump to label: Battle Music Menu

This continues untill all options have been explored by the conditional branches. This example only covers the Battle Music, but I am implementing this for all of the music in my game. Obviously this takes a long time to make.

Now, when you want to obtain the MP3 Song, you use a event that uses a script:
Code:
$game_mp3.push(Item_ID)

While I was testing my MP3 player I kept getting a syntax error. I don't know why it does this or how to fix it. (I might if the people who run the RMXP academy would grade my assignment so I could continue the lessons.....). Anyone know what is going wrong here or can fix it very easily??? I am using SDK v. 2.2 and MACl V.2.0. I am also using a Dynamic Time System v. 4.1, a level up window, a Chrono Menu, and a Skill shop. None of these are affecting my MP3 Player though because I have tested my MP3 Player on a different project that had absolutely nothing in it, and I still got the same error.(the exact thing, I copied and pasted over from one project to another). Thanks to anyone who helps me with this problem I am having.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top