Adding SFX

Post Reply
User avatar
Raftronaut
Posts: 35
Joined: Mon Sep 03, 2018 4:47 pm

Adding SFX

Post by Raftronaut » Sat Mar 02, 2019 10:53 pm

Hello!!

I am trying to add new SFX to my game and am not understanding how to accomplish this. I added a new SFX in the sound menu with the plus button. I imported collectable tiles from the maze tutorial into the Shooter module and I would like it play my SFX when the tile is flipped. Do I do this by opening the Defined Scripts folder and editing the ASM to include ;PlaySound #sfx_testsfx in the script?
I'm a noob with ASM language so any and all advice is appreciated.

Thanks!
User avatar
dale_coop
Posts: 3058
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Adding SFX

Post by dale_coop » Sat Mar 02, 2019 11:13 pm

If your sound is named "sfx_testsfx", you will have to add the line :

Code: Select all

  PlaySound #sfx_testsfx
in the script you want to execute that line, yes. Take care, it's case sensitive. So "sfx_testsfx" is different than "SFX_testsfx" and if you don't write exactly as the name, you will have error on compilation.
If you comment out the line, it means add a ";" before a line... the compilation will ignore that line (so your code will not be executed).
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
User avatar
Raftronaut
Posts: 35
Joined: Mon Sep 03, 2018 4:47 pm

Re: Adding SFX

Post by Raftronaut » Sun Mar 03, 2019 5:29 am

Got it!

thanks!
Post Reply