Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.
So basically I have very basic code to have a sound file play when character takes damage but for some reason it doesn’t work and I got no clue why since it worked before.
This is all the code I have going on for this very specific sound. The character is using the health point behavior and it works for taking damage and everything else but for some reason it does not want to trigger the sound. The problem is not the sound because when used code like “if X key press = then play bloodhit.ogg” the sound file does work. Sound channel 12 is also not used by anything else.
If the trigger sound is before the trigger damage it may cause an issue since the way gdevelop works is it runs all Events every frame (set up in game properties and icons) and it runs them from top to bottom, so that may be an issue? idk
I know for a fact because I had something like this when I was making a tutorial for my shooter game and it would not detect because the thing was above the other
This was simplified version of my code. If I remember correctly it wouldn’t work the other way since the damage sound has to be shared between multiple characters and multiple items and what not so it wouldn’t work if they were all on the same line. If I would do it the other way I would have to put the “play sound” line to each item (which there are 5 of) rather than just putting it to “character takes damage” once.