Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

How to make boss appear after 7 enemies die

I had a solution for this that I was sure would work, but it hasn't.  I need a battle that begins with 7 enemies.  After all of them have been defeated, I want the 8th to appear.  Here is what I tried:

I made a troop with 7 imps, and 1 boss which appears halfway.  I made 7 event pages, one for each imp, which adds +1 to a variable (lets call it variable:multi), when the imp's HP reaches 1% or below.  I've made the imps immortal to ensure that the variable switch gets activated, and on the same event pages, I have the imps transform to another imp and add the state knockout.

Then I have a common event.  In it is a conditional branch if variable:multi = 7.  If yes, enemy 8 (the boss) appears.  Else, it's left blank.  On turn 0, the variable:multi is set to 0 and the common event is called.

This isn't working.  I've tried fiddling with a few things, such as associating a switch to the common event which is actived turn 0, and calling the common event every turn.  So far I haven't had any luck.  What am I doing wrong?  Is there another way to do this?
 
That's what I'd suggest ^^

After you fight the seven monsters, then the battle ends like normal. You could shake the screen, and have the characters be like, "whats that sound!", "something's coming" and then start the second battle.


EDIT: The best way to make it "seamless" would be to go to the troops tab, and right click on the monster and choose "appear halfway". Then at least they would have had to kill something before it appears...
 
lorddonk":ehr3crsa said:
EDIT: The best way to make it "seamless" would be to go to the troops tab, and right click on the monster and choose "appear halfway". Then at least they would have had to kill something before it appears...

Did you read my post?  That doesn't work.
 

Nachos

Sponsor

lorddonk":35tnd76r said:
That's what I'd suggest ^^

After you fight the seven monsters, then the battle ends like normal. You could shake the screen, and have the characters be like, "whats that sound!", "something's coming" and then start the second battler


EDIT: The best way to make it "seamless" would be to go to the troops tab, and right click on the monster and choose "appear halfway". Then at least they would have had to kill something before it appears...

that doesn't work?
 
Which part are you referring to?  The first part suggests that I go back to the map and then start the second battle, which I don't want to do.

The second part seems to suggest using a single battle and making the boss appear halfway, which I have already tried to do myself.

Unless I've misunderstood something.

Using two battles won't work for me unless I can find a way to make it begin immediately after the first without returning to the map.
 
Here's what I'd do. In the troops tab, every time an enemy dies (HP 0%) run a common event. In the CE, check using Conditional Branches if Enemy 1 is Knockout inflicted; if Enemy 2 is Knockout inflicted; all the way up to 7. If all of them are, make the boss appear, if not, just don't put anything and end the CE.
 
Regimos":2pqsmvwu said:
Here's what I'd do. In the troops tab, every time an enemy dies (HP 0%) run a common event. In the CE, check using Conditional Branches if Enemy 1 is Knockout inflicted; if Enemy 2 is Knockout inflicted; all the way up to 7. If all of them are, make the boss appear, if not, just don't put anything and end the CE.

I think I'm getting close, but I'm not quite there yet.  I'm probably setting up the conditional branches wrong.  Killing a single enemy will make the boss appear.  Should I look up a tutorial for conditional branches, or could you explain the correct way of going about this?
 
Put the conditional branches inside each other, like so:
Code:
@>Conditional Branch: Enemy 1 is Knockout inflicted
   @>Conditional Branch: Enemy 2 is Knockout inflicted
      @>Conditional Branch: Enemy 3 is Knockout inflicted
          @>etc...
      : End
   : End
: End
@>
 

Nachos

Sponsor

or just enemy kill + 1 to a variable:
Code:
@>Conditional Branch: Enemy 1 is Knockout inflicted
   @>Conditional Branch: Variable is = equal 0
 Battle processing: boss
[\code]
     
 
Oh, I figured why the variable problem occurs. You set it so it adds one to a variable if the enemy's HP is less than 1%-- but when it dies, its HP will always be less than 1%! This means that every turn or round, the variable will add 1, so it will get up to 7 quickly even if only one enemy is dead.

What you can do is call a common event each time the enemy dies. In the CE, instead of the troop event, set the variable and check if the variable is 7. Make sure the Trigger is set to "None"! This way, it will only set the variable once instead of every turn for each monster.

And there's also my other method, see my last post.
Regimos
 

Nachos

Sponsor

Hey, you can simply do this in 2 ways:

A_In the event, afther the first battel processing, but the other, or some text, i know it's not  exactly what you wanted, but it works.

B_Enemy transform!

C_let me think about it.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top