+ -

07 - Create an Enemy

Creating your first monster is always a fun experience. Let’s get started!



Basic Setup

Create a Prefab Event, name it Slime. In the Database, also create an enemy with the same name. In the Database, customize the monster’s stats however you like.



Add the notetag <enemy> to the event (or you can create your own notetag, it doesn’t have to match). Next, create a Range Detection conditional branch. Don’t forget to give it some Autonomous Movement.

Optional: You can also add the condition gotHit(this), which will return true if this event’s HP decreases.


Collision Setup

Create a common event called Enemy Collision Check. Use a conditional branch checkCollide between “this” and events with the notetag <magicAttack>.

Here, when checkCollide returns true, use the command Increase / Decrease Character HP with event ID “this” and HP Change “- damage” to reduce the Slime’s HP by the value in the notetag <dmg: x> of the event with <magicAttack>.

If you want to show damage numbers, use the Pop Text Value command and write “damage” in Value.


Go back to the Slime event, add the passive feature, and call the common event you just created.

Uploading: 60052 of 60052 bytes uploaded.

Now, try moving an event with notetags <magicAttack> <dmg: 50> toward the Slime. You’ll see the Slime’s HP drop by 50 points. This is just a test, don’t use <dmg: 50> in your actual game.

Attack State

Create a new page, check the box Self Switch A. On this page, we’ll build the AI attack pattern.


Make the event move 3 steps toward the player, then create a Dynamic Event with notetags <enemyAttack> <dmg: Physical Attack> <hitbox: 1.5, 1.5> lasting 3 frames. End with a 60‑frame wait. Since the trigger is Parallel, you’ll see the entire pattern repeat continuously.


Create a Skill called Physical Attack and customize it as you like.


Death State

Now you have a Slime that can chase and attack you. The final step is deciding what happens when its HP reaches zero.

Create a new page, assign it any Self Switch. This page should be the last one. Add a comment with <death> (or any tag you prefer). You can do anything here, for example, play a death animation for the Slime before using the Destroy Event command to remove it from the map.


Create a new common event named Enemy Death Check. Use a conditional branch HP(this) <= 0 to check whether the Slime’s HP has dropped to 0. If it returns true, call the command Control Self Switch and enter <death>. It will automatically jump to the page that has the comment <death>.


The final step is to point Enemy Death Check into passive on the pages where the event is still alive.



And with that, you’ve finished creating a simple enemy. No matter how complex an event becomes, it will always follow these basic steps. The rest is entirely up to your creativity and how skilled you are at eventing.
English
Japanese