Let’s Set SE for the Enemy
Next, let’s set SE (Sound Effects) for the “enemy”. There are two types: “sound on taking damage” and “sound when defeated”. However, the “enemy” does not have a “Taking Damage” state. In such cases, you can use the TakenDamageSettings (Damage Taken Settings) node, so let’s try using it.
Let’s Play SE Using the TakenDamageSettings (Damage Taken Settings) Node
-
Switch the Scene tab to “enemy”.
-
In the Scene window, select the TakenDamageSettings node.
-
Expand the “Damage Taken Data List” in the Inspector.
-
Click “+ Add Damage Taken Settings”.
-
Click and select “New TakenDamageData”.
-
Expand the generated “TakenDamageData”.
-
Expand “> Other Settings”.
-
Set “Play Sound” to “On”, and set “se_enemy_damage” in the “Sound Data” field.
- Let’s try a test play. If the SE plays when a bullet hits the enemy, it is successful.
Add “Play Sound” to the Enemy’s “Disappearance” State
This is the same as before.
-
Select the “Disappearance” state and click “+ Add Execution Action”.
-
Select the “Play Sound” action, choose “se_enemy_down (se_enemy_down.ogg)” in the Sound Data field, and add it.
- Rearrange the order of actions by moving “Play Sound” before “Insert Wait”. This completes the setup.
- Let’s try a test play. If the SE plays when the enemy is defeated, it is successful.




