In this course, you will learn the basics of script creation in ACTION GAME MAKER.
In the second session, we will create enemies.
Prerequisites to Start the Course
Continue using the project from the first session.
Please open the project and prepare accordingly.
STEP 1: Set Up the Basic Configuration for the Enemy (Zombie).
-
Use the zombie template object for the enemy. Open a new tab, select Game Object, and create it with the following settings:
Name: Any, here we will use Sample_Zombie.
Template: characters
Type: Enemy_Zombie
Group: Enemy
After creation, save it using Ctrl+S.
-
Configure the basic settings. Open BaseSettings and set the following:
Enable Auto H Flip: ON. The Visual Script recognizes the right side as the facing direction. However, since this object is created facing left, you need to enable the auto horizontal flip mode.
Enable Object Condition: CLOSE TO CAMERA. *The object will be disabled and inactive outside the camera’s range.
HP: 5, MaxHP: 5. Since 1 HP is too low, set it to 5.
InvincibilityDuration: 0.2 seconds. *This is the invincibility duration after taking damage. Since 1 second is too short, set it to 0.2 seconds.
-
Normally, various collision checks and animation settings are also required, but since these are pre-configured in the template object, the basic setup is complete.
Explanation
About Invincibility Duration
The invincibility duration is very important. If no invincibility duration is set, attacks will continuously hit until the attack detection disappears. On the other hand, if the duration is too long, continuous attacks like machine-gun fire may not register due to invincibility. Adjust the settings to find the optimal configuration for your project.