Sign in to follow this  
Followers 0
Rustedmind

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

6 posts in this topic

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

 

post-71549-0-75089000-1490055800_thumb.png post-71549-0-96295300-1490055895_thumb.png post-71549-0-78913400-1490055902_thumb.pngpost-71549-0-12085000-1490055907_thumb.pngpost-71549-0-74228600-1490055911_thumb.pngpost-71549-0-96233800-1490056108_thumb.png

Edited by Rustedmind

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

Like this?

 

 

post-71549-0-34648400-1490060646_thumb.png

 

 

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.