😈 Enemy: Create a basic enemy (basic method)

There are many ways to create enemies using this plugin, but I'll show you my way, which is optimized for workload.


Goal: All enemy needs collision checking and HP bar

The idea: All enemy events will run the same common event in parallel to check collisions





We have a feature for that, let's open the Action Combat plugin parameter, find Events Notetags. Create a notetag called <enemy> and assign the common event ids that any event with this notetag will run in parallel.



Now, let's create our first enemy, putting <enemy> to its notetag box. We'll also add notetag <hp: x - y> to assign a HP amount to this enemy. 70 - 130 means a random amount between 70 - 130. You can also use a fixed number so this enemy always has like 70 HP, your call. If you want to use a database value, write <hp: enemy name from database>.



Now when you run the game, you should see your enemy has a HP bar on it automatically.




Remember the common event id you assigned to events with notetag <enemy> early on? Let's open that common event. To check collision, we need to create a conditional branch checkCollide

Let's say you want enemy events to take 10 damages when they collide with any events with notetag <projectile>. We'll use checkCollide(this._eventId, '<projectile>'). If the collision is true, it'll decrease this event HP by 10 and also pop up the damage number 10. 


Note: You don't need to enable a Switch for this common event, as this common event will automatically run when enemy event is on the map.


['<projectile>'] or just '<projectile>' both work.
[ and ] should be used when you want to put more notetag


That's basically it. What if you want each <projectile> event will deal different damage? Like you have 2 <projectile> events, one is fireball and one is snowflake. You want fireball to deal 10dmg and snowflake to deal 20dmg.  Simply add notetag <dmg: x - y> to your fireball or snowflake event.




Then in the previous common event id, change -10 to -damage. This means it'll use value from <dmg> notetag of the projectile event that just collided with the enemy.



Now when any of your enemy event collide with an event with notetag <projectile>, they'll take different values of damage.


DEATH

To manage the death stage of enemies, we'll need to create another common event. Here's how it works:
  • Use a Conditional Branch: Check if the enemy's HP is less than or equal to zero with HP(this._eventId) <= 0.
  • If True: Activate a Control Self Switch to the letter that manages the death stage. I've been inconsistent in the past, sometimes using 'C', other times 'D', which is disorganized.
  • To solve this, I now use a plugin command Control Self Switch that comes along with Action Combat plugin and switch to any page marked with the comment <death>. That way I don't need to care about the letter, the plugin will handle it for me.


Now, let's return to the enemy event. We need a page dedicated to managing the death of this event. Once the HP falls to 0, this page activates due to the previous common event. Here, you can add any decorative elements you fancy. The critical part, however, is to use the Destroy Event plugin command to eliminate the event entirely. Don't use RPG Maker's Erase Event because it doesn't permanently remove the event.


DEATH (ALTERNATIVE METHOD)

As I noted earlier, this plugin allows for multiple approaches to handle mechanics. If you're looking for a simpler method, you can bypass the more structured approach I described, which offers better control. Instead, you can just add all the necessary commands directly into the common event, and that's all you need.

5 RPG Maker Action Combat Manual: 😈 Enemy: Create a basic enemy (basic method) There are many ways to create enemies using this plugin, but I'll show you my way, which is optimized for workload. Goal: All enemy need...