Hello. I need some help. I’m making a shooter where there are bosses at the end of each level. This boss has arms and a body all able to take damage separately. After a piece of the boss dies (say an arm), I want to change the sound of my bullet upon collision with said arm, so the player knows audibly that this part of the boss is dead. How do I do this? Thanks.
If the boss is composed by different sprites add a variable to the sprite so check if is alive or dead when the bullet collides to that Sprite part let’s say arm so check
if Arm variable alive = 1 play this sound
if Arm variable alive = 0 play this other sound
This is a way there is a lot of ways to do what you want
Other approach will involve opacity just change the opacity of the dead part to 254 so later check
if right arm opacity = 255
Play this sound
if right arm opacity = 254
Play this other sound
Thanks. I’ll have to give those things a try. I’m really new to coding in general. I hope I can figure out how and where to input those commands. Does it matter where in the event order? Anyway, thanks! I follow you on itch.io btw.
Ulises, ok so I tried what you said, but it’s not working. I imagine I just have it coded wrong. Can you take a look at my code to see why? When I input the code to change opacity and then play the game, after destroying the BossBottomArm the sound just goes haywire and doesn’t play correctly. The full screen is my section of the code, the small clip is the code that makes the sound go haywire. Thanks!
Since you change the animation for the BossBottomArm to “Broken” there is no need of anything extra
Just do this.
PlayerBullet is in collision with BossBottomArm
BossBottomArm animation name = “Broken”
Play the new sound here
Hmm, yeah that didn’t work either. The template I’m working in is the 8 bit shooter. It messes with the animation, when I put your code in.