Jump to content


Photo

How to kill an enemy only when all others have died?


  • Please log in to reply
5 replies to this topic

#1 Rustedmind

Rustedmind

    Newbie

  • Ace Member
  • 3 posts
  • RM Skill - Jack of All Trades

Posted 19 March 2017 - 03:40 PM

Hi, I'm trying to make a battle in which there is a boss + three minions. The boss is completely immortal until all three minions are killed,

which causes the boss to die immediately. Any idea how I would go about making the boss die only when this happens?



#2 lonequeso

lonequeso

    One cheese to rule them all!

  • Ace Member
  • 2821 posts
  • LocationChicago, IL
  • RM Skill - Designer

Posted 20 March 2017 - 09:19 AM

You can do it though battle event in the troop database. Before that, go into the Enemies tab and give the Boss the Immortal state. If you also want him not to take any damage,create a custom state that makes his PDR and MDR (physical/magical damage rates) to 0. You can set them in the Enemy params, but having a state will allow you to easily change the params back to normal. You'd also want him immune to any slip damage i.e. Poison.

 

Okay! Now you have an Immortal boss. Now create your troop with the boss and his three goons. You'll notice on the bottom of the window, there's an area to create events.  On the top there's an option to choose how to trigger the events. You can set it to check if an Enemy's HP is at 0%. Do that for the first goon. Set it to run Once per Battle. All you need is a single event command. Under Control Variable, create a variable to track how many goons are dead and add 1 to it. Copy and paste that page twice for the other two goons and change the trigger condition to the correct Enemy. 

 

Now make a fourth page. Have this one set to run on Moment. That way the instant all enemies are dead, he'll lose his Immoral state so any actors or slip damage not applied yet will effect him the same turn. You don't need a trigger condition. Create a conditional branch:

 

If Dead Goons = 3

  remove state[boss]: Immortal

(if you have a state to reduce damage, remove that, too.)

 

Now he'll die when he's supposed to. if you need to toggle this page so it doesn't keep running set it up like this:

 

If switch[Immortal] = OFF

 If Dead Goons = 3

  remove state[boss]: Immortal

control switch: Immortal: ON

(if you have a state to reduce damage, remove that, too.)

 

That should work just peachy  ^_^


Edited by lonequeso, 20 March 2017 - 09:27 AM.


#3 Rustedmind

Rustedmind

    Newbie

  • Ace Member
  • 3 posts
  • RM Skill - Jack of All Trades

Posted 20 March 2017 - 06:33 PM

For some reason the game isn't using the final tab of the the battle event, in which the boss loses it's immortality.

Here are all the tabs I'm currently using in the battle event.

 
Spoiler

Edited by Rustedmind, 20 March 2017 - 06:34 PM.


#4 lonequeso

lonequeso

    One cheese to rule them all!

  • Ace Member
  • 2821 posts
  • LocationChicago, IL
  • RM Skill - Designer

Posted 20 March 2017 - 06:45 PM

try putting a wait command outside and under the branch, Battle events works kinda weird and don't process like normal ones. a wait command of 2 frames should force it to run. If not, something else is amiss, but that looks right. 



#5 Rustedmind

Rustedmind

    Newbie

  • Ace Member
  • 3 posts
  • RM Skill - Jack of All Trades

Posted 20 March 2017 - 07:52 PM

Like this?

Spoiler


EDIT: (The span in the picture is supposed to be 'moment', sorry. The result is still the same, however.)

If so, it still isn't working, unfortunately. Even without a conditional branch, nothing I put in the last tab seems to happen at all.
I really have no idea what could be causing this.

Edited by Rustedmind, 21 March 2017 - 03:12 AM.


#6 lonequeso

lonequeso

    One cheese to rule them all!

  • Ace Member
  • 2821 posts
  • LocationChicago, IL
  • RM Skill - Designer

Posted 20 March 2017 - 10:17 PM

You only need one wait command, and it should be at the very end of the event. 

 

If Dead Goons = 3

  remove state[boss]: Immortal

 end

Wait(2 frames)

 

If it still doesn't work, there's another way to write it that may. Basically the same thing condensed into one event page. (now that I think of it, this is much more streamlined, too)

 

Have it Set to Don't Run and Moment. All you need is a few Conditional Branches:

 

If Enemy2 state[Death]is inflicted

  If Enemy3 state[Death]is inflicted

    If Enemy4 state[Death]is inflicted

      remove state[immortal], enemy1

end

Wait(2 frames) <==== just to be safe. If the battle works, try w/out, too. No point having a needless command.

 

If enemies-4 are dead, it should remove the immortal state.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users