How do I Trigger one sample after another like the red coins in Mario games?

Hi there!

I’m a student working on a video game where you play as a ball and have to collect these cubes, and once you collect them all, you beat the game.

The issue I’m having is that I want these cubes to have a ‘Red Coin’ effect like in the Mario games, but I’m not sure how to go about it in Fmod; when each one is picked up, the pitch goes up and notes change, as well as the samples not repeating.

Please help!

There are a few ways to go about this. For example:

  1. Create a discrete parameter with (for example) 8 values and place a single instrument on each parameter value in the parameter sheet. The sample of the single instrument can be of 8 different pitches or of the same sample with pitch adjustments. Pass the value of the number of cubes collected to the event’s parameter to play that single instrument.
  2. Create an event with one multi instrument set to Global Sequential. In the multi instrument playlist add 8 different single instruments (again, 8 different sample or 1 sample with 8 different pitches). Each time this event is played it will play the next playlist entry.

There are other ways, but you can use this as a starting point and see which suits your workflow best.