Would it make sense to play the hurt sound in the reset_player() function

Since that function is called every time the player “dies,” would it make sense to play the hurt function there, that way you don’t have to copy/paste the function call three different places? just thinking out loud.

Yes, this is good thinking.

It’s not necessarily a universal answer. For example, you might want different death sounds for different death types, such as distinguishing between a trap and running out of time. For the course project however, there shouldn’t be any problem with playing the death sound… well… on death XD

It’s worth noting that this works because the asp isn’t a child of the player.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms