How to specify Enemy in Conditional Branch

So my first quest is to clear out a cave with bandits. So in Conditional Branch there's an option for Appeared and State. The option in State would be knockout. In Enemy there's options for
#1 ? Through #8 ?

How can I specify which enemy would be part of the quest to defeat?
I think #1 would be the first enemy added to the troop in the editor. And the other numbers coorospond with when the enemy was added to the troop maybe

don't quote me on that. That's just my gut feeling
Are you really using RPG Creator (which runs on mobile devices) or RPG Maker? If RPG Maker, what version - MV?

Please use PrintScreen rather than taking a photo with your camera. Too distorted.

@Oddball is correct - the numbers refer to the order in which you add them to the troop. However, this only works if you add the command to a troop event, which is where enemies and troops exist. It will do nothing on a map event.

If you were in a troop event, it would actually show you the names of the enemies, rather than just numbers. Still doesn't help if you have 4 of the same, but at least it's a sign that you CAN use that condition in your test.
Thank you. And I am using MV.

I've moved this thread to MV Support. Thank you.

I think you have some misconception here? This conditional branch option won't tell you anything about battle events wandering around the map. It only works when you're actually in battle. I believe you can use it in a common event called from battle (but I haven't tested); in that case you'd just have to know which enemy is which.

If what you want is to check if events on the map have been fought and defeated, probably the easiest way would be to check their self switches. If each one sets Self Switch A to ON when you've defeated it, then the following script condition should give you the information you need:

JavaScript:
$gameSelfSwitches.value([map_id, event_id, "A"])

Replace map_id with the numeric ID of your map, and replace event_id with the numeric ID of the event you're checking.
So I am really trying to wrap my head around what you are asking. I looked at both uploaded pictures...

Are you trying to create an encounter event that triggers if the player has a specific quest that is not completed?

If so, below is an example of a template I created to handle battle events for quests.

This event will show, but cannot be triggered by a player until they accept a specific quest. Once defeating the boss the event is no longer active.

Spoiler: Quest Encounter Event
◆Comment:Curate Class beginning quest use only.
◆If:bq1_curate_on is ON
◆Set Movement Route:Player
: :◇Move toward Player
◆Control Variables:#0087 d100 = Random 1..100
◆If:d100 ≥ 75
◆Shake Screen:5, 5, 60 frames
◆Battle Processing:Scarecrow
◆Jump to Label:battle-end
◆
:Else
◆If:d100 ≥ 50
◆Battle Processing:Scarecrow*2
:If Win
◆Jump to Label:battle-end
◆
:If Lose
◆Text:None, Dim, Middle
: :You have been defeated!
: :This is NOT the end!
: :Rest up and try again!
◆
:End
◆Jump to Label:battle-end
◆
:Else
◆If:d100 ≥ 1
◆Battle Processing:Scarecrow*2, Enraged Scarecrow
:If Win
◆Text:None, Dim, Middle
: :The enraged scarecrow has been banished.
: :The other scarecrows resume their
: :normal duties. Return to Maxwell
◆Common Event:LT Common
◆Control Switches:#0126 bq1_curate_on = OFF
◆Control Switches:#0127 bq1_curate_end = ON
◆Erase Event
◆
:If Escape
◆Text:None, Dim, Middle
: :You barely escape with
: :your life. Rest up and
: :try again!
◆
:If Lose
◆Text:None, Dim, Middle
: :You have been defeated!
: :This is NOT the end!
: :Rest up and try again!
◆
:End
◆Jump to Label:battle-end
◆
:Else
◆Label:battle-end
◆Control Self Switch:A = ON
◆
:End
◆
:End
◆
:End
◆
:Else
◆Text:None, Dim, Bottom
: :rabble, rabble, rabble...
◆
:End
The way I verify whether all enemy events associated with a quest is this:

Code:
var enemyIDs = [1, 2, 3, 4, 5];
var allDefeated = true;
enemyIDs.forEach(function(id) {
if ($gameSelfSwitches.value([1, id, "A"]) != true) {
    allDefeated = false;
  }
});

Where 1, 2, 3, 4, 5 is the event IDs of the enemies you're checking for (assuming they're all on the same map; you can have a quest with enemies on different maps with slight tweaks to the code) and 1 is the ID of your map.

Then you can use allDefeated to reference whether you've completed the quest or not (by itself, it will stop existing outside the scope of this script command so if you want to use its value elsewhere you'll have to assign it to a switch or something).

Original thread: https://forums.rpgmakerweb.com/threads/how-to-specify-enemy-in-conditional-branch.123333/