How to count number of monsters killed

Gluttony

Villager
Member
Joined
Mar 26, 2012
Messages
20
Reaction score
0
First Language
English
Primarily Uses
Bit of an update. For anyone who cares or ever needs this, I've figured out how to do it, no scripts necessary.

Within the database, go to the Troops page and look at battle events. "Span" should be set to Battle, and "Conditions" should be set to Enemy X's hp is 0% or below (With X being the enemy that you're counting kills of).

The event itself should simply be Control Switch: Monster Killed ON (you'll need to create a switch for this purpose.)

If there are multiple monsters within the same troop that you want counted, you'll need to create one troop event page per monster to be counted in the troop. Span should be the same on all of them, with conditions the same, aside from X being changed in each. Each event should turn its own Monster Killed switch (you'll need to create as many switches as you have monsters to count)

(Each troop event page should trigger for a different monster, so for example if you have a troop of 3 monsters and you want the deaths of the first 2 counted, you would create 2 pages and set the conditions as Enemy 1's hp is 0% or below and Enemy 2's hp is 0% or below while enemy 3 wouldn't need a page since its not intended to be counted. The events would likewise be Control Switch: Monster Killed 1 ON, and Control Switch: Monster Killed 2 ON)

Now. Once you've got your troop events and switches set up, go to the Common Events page (also in the database) and create one common event for each switch you have in the previous section. Each common event should have its trigger set to autorun, and the condition switch corresponding to a different Monster Killed switch for each event.

Each of the common events themselves should proceed as follows (note that you'll need to create a single "monsters killed" variable):

Control Variables: Monsters Killed +1

Control Switches: Monster Killed X OFF

Each common event should turn off its own trigger switch upon completion.

Now finally, let's say you want your players to talk to a certain NPC who will only respond once they've killed 10 of this specific kind of monster. What you would do is create a conditional branch, the condition being Variable: Monsters Killed >= 10. Under that first branch you'll put whatever aspects of the event you want to occur once the number of monsters has been reached is, and under "Else" you can put whatever sort of "you have not killed the required number of monsters" message you want.
 

Latest Threads

Latest Posts

Latest Profile Posts

Well... I just spent most of the day making something I cant even use xD

Hero_1.png
The idea was to look at the original but at a medium distance.
In hindsight, I might as well have just edited the original lol... I didn't intend for it to end up so similar.
does anyone else feel tired after completing a sprite?
Fun fact: I always lower every tileset saturation (about 15%-25% of it) in my projects.
My today's performance in janitor work was so insane that my colleague suspected I was high on something.
Learning about how trademark works for game titles has given me new understanding about another reason why AAA developers/publishers sometimes reveal new games as "Project XXX" as a working title instead of the actual title. The cutthroat world of trademarks and IP trolls gets rougher every year as the pool of available titles for (legally safe) use shrinks due to the limitations of language.

Forum statistics

Threads
113,900
Messages
1,078,290
Members
147,994
Latest member
PineappleGrisGris
Top