Stop an encounter with battle option of parallel event

Hi. In the game i'm making, i'm trying to set thing as if my character have 3 item, the troops who drop the items stop from appearing.

I created 2 identical troops, one without drop, one who drop the item.
In the Battle Event, i made a condition :

Condition for appearing : Item drop = ON
If : item = 3
Control switch : Item drop = Off
End

The item drop switch is ON by default. But after droping these 3 items, i still get the troops who drop them.
So i tried differently. I made a parallel event with the exact same condition : still doesn't works.
Can you take a screenshot of your battle event?
Here's
By the time the Battle Event runs, the troop has already been determined. And I believe once in battle, the only common events that run are called via the Common Event command - they won't run as parallel or autorun.

Are these random encounters, or are they called from map events? What controls the switch? What do you do with the switch? The conditions you have above don't really make a lot of sense, as it seems they're checked when it's already too late.

Please show screenshots of your event that uses these conditions. Take the whole active window, without cropping stuff away.
Are these random encounters ?
Yes. I wanted, at first, to make them with the Battle Processing, but it would spam.

What controls the switch ?
Autorun Event -> Control Switch Item Drop = ON, then self switch to B without autorun.
Then, the condition on parallel and on the troops Battle Event, who check :

If : item = 3
Control switch : Item drop = Off
End

item being a variable assigned to an item.
That screenshot really doesn't tell us much.
I know, but i answered the questions there.

Here's all the event related :
Again, by the time any troop event is run, the troop has already been selected.

None of those screenshots shows how you're telling it what troop will be fought. How are you telling it to use the troop that doesn't drop the item?


Honestly, I think you're either going to have to ditch random encounters and use events that do a conditional branch - if item >= 3, battle troop that doesn't drop, else battle troop that does drop; or have a single troop with enemies that drop the item, with a troop event that runs once at the start that says if item >= 3, transform each enemy to the version that doesn't drop the item.
the cause is most likely that you didn't understand the control variable command.

that command loads the variable with the current value given. it does NOT constantly update that value.
in your battle event, you check the variable for the number if it is two.
but it is never updated after the initial check on the first page of the map event, a check that never repeats because you switch to the next page. So it will most likely stay zero no matter how many of the items are dropped.

the usual way is to place the control variable command before each conditional branch checking it, to update it to the then-current value.

that and of course that you never have anything to determine which enemy is engaged like shaz mentioned above.
What you *can* do, if you have fewer than 4 enemies in the troop that need to meet this condition, is this:

1595846896001.png


create two copies of the enemy, one that drops the item and one that doesn't. Put one of each in the spot where that enemy will appear in the troop (in the troop in my screenshot, there are two Slime and two Slime w/o potion) and make ALL of them set to "appear halfway" (right click the enemy for this option).
Ok, i tried the second method (still new to learning that, so the most easiest for me) Shaz.

So, normally, it should works now. Didn't. Tried with two version, one who turn off the switch, and one without turning it off (because well, it wouldn't really be useful now).


EDIT : Ok, so i MUST declare the variable directly there. I'll try now.

EDIT 2 : Ok, idiot-me declared the variable on an event that require the items. Which is pretty stupid. I feared that putting it on the troops would reset it everytime. But still doesn't work. I still drop item even when i got more than 2 (yeah, 3 is now 2, i changed some rule)

EDIT 3 : Ok, i put the condition on turn 0, and IT WORKS ! If i put the switch "item drop", it doesn't.

Thanks a lot all of you !
Set the battle event condition to turn 0.
Final thing : what went wrong with the "item drop" switch ? I though it made some sense to have a parallel event to check if i got 3 items and deactivate the monster_event just to let the monster after

(oh, and, like Andar said, the item variable stay 1, doesn't really update with what i have in my inventory automatically, so i put the check where i need the 3 items, even if a parallel event would work too)
You do not need the switch.
I mean by that, can't i just put a switch or a variable that would pop the troops_event instead of troops, and when deactivated, would just pop the troops ?

Original thread: https://forums.rpgmakerweb.com/threads/stop-an-encounter-with-battle-option-of-parallel-event.124570/