Calling no. of enemy troops in region/map

aprilodee

Warper
Member
Joined
Aug 13, 2019
Messages
2
Reaction score
0
First Language
English (UK)
Primarily Uses
RMMV
Sorry in advance if I can't see the wood for the trees.

Broad view: Generic 'please clear map of enemies to advance game' quest

First idea: Use conditional branching event to check for live enemy troops and then turn on switch which acts as success state when none are present.

Thing I need: Is there a script call for number/presence of enemy troops which are/are not KO in a map or region?

If no call exists, can I do the equivalent of creating a var 'n' which inc. by 1 every time an enemy troop is KO, and have the conditional branch check for var = n to trigger the switch?

Any and all advice welcomed.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,262
Reaction score
7,138
First Language
German
Primarily Uses
RMMV
wrong assumptions, you need to build your logic from the other end.

1) I'm assuming you have events pretending to be enemies, because random enemies are unlimited.
2) if that is the case, you need to use the branches of the battle processing command: if win then control variable (counting wins on map) +1
3) you as the developer knows how many enemy events you placed on the map, so your conditional branch checks if the variable is lower than that number or not.
 

aprilodee

Warper
Member
Joined
Aug 13, 2019
Messages
2
Reaction score
0
First Language
English (UK)
Primarily Uses
RMMV
wrong assumptions, you need to build your logic from the other end.

1) I'm assuming you have events pretending to be enemies, because random enemies are unlimited.
2) if that is the case, you need to use the branches of the battle processing command: if win then control variable (counting wins on map) +1
3) you as the developer knows how many enemy events you placed on the map, so your conditional branch checks if the variable is lower than that number or not.
Yep, events as enemies, no random encounters.
Perfect.
Thank you for your quick succinct help.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

This time around I don't have early access to the new maker, so I have to wait like everyone else to look under the hood. I really hope we get to soon though, I'm pretty excited :D
Chaos17 wrote on Poryg's profile.
Hi, I am following your videos tutorials serie about coding on MV and I am at the third video. Thank you for making it but's a bit hard to follow since you don't show the whole plugin at the end. I had to screenshot the lines between 110-159 because you scrolled so fast on them.
:rtear:
I'm not sure if I should be happy for MZ, or sad for MV.
Not going to lie.... The update's cool and all, but I immediately ran to Mog's site and was like, "Update! Update! Update!" while breathing on the page of his Star Ocean Battle System plugin. :kaoswt:
Ho boi. I can already see the storm of ugly actor faces RTP customizable facesets from MZ are gonna flood. XD

Forum statistics

Threads
99,463
Messages
965,684
Members
131,073
Latest member
James1998
Top