Tutorial: "ACTION GAME MAKER from Scratch" Chapter 5

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

  1. Switch the Scene tab to “enemy”.

  2. In the Scene window, select the TakenDamageSettings node.

  3. Expand the “Damage Taken Data List” in the Inspector.

  4. Click “+ Add Damage Taken Settings”.

  1. Click and select “New TakenDamageData”.

  2. Expand the generated “TakenDamageData”.

  1. Expand “> Other Settings”.

  2. Set “Play Sound” to “On”, and set “se_enemy_damage” in the “Sound Data” field.

  1. 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.

  1. Select the “Disappearance” state and click “+ Add Execution Action”.

  2. Select the “Play Sound” action, choose “se_enemy_down (se_enemy_down.ogg)” in the Sound Data field, and add it.

  1. Rearrange the order of actions by moving “Play Sound” before “Insert Wait”. This completes the setup.

  1. Let’s try a test play. If the SE plays when the enemy is defeated, it is successful.