MV Check if party is empty conditional branch

Hello everyone! I'm trying desperately to check with a conditional branch if the party or the inventory is empty.
I'm giving the player a random party, but I want to check back if the random add to party got successful.
I tried with those lines, but they do not work, they work on delay and bad.
Is there a way to check by a simple script the thing and, if party is empty (or/and, if weapon inventory is 0) to get back to the add to party sequence (maybe with a label or a switch)? Thanks

1630955862936.png
Game Party will never be empty, there will be allways at least one member in party - leader.
How can you play a game without characters?
That's not what I asked for...I have an empty party after initializing the whole thing by a script command. I then execute a custom random add to party. Just want to check if everything went smooth. So I need a script command or another way, to check if at least 1 actor and at least 1 weapon is on the party

1630956289547.png
Maybe then $gameParty.members().lenght > 0 ?
@Soulrender technically the engine can work with an empty party, to allow for sequences before the party is selected and more.

@joket how about ignoring scripts and using only events?
control variable to get the ID of the first party member (that is one of the options in the game data section)
then check with conditional branch what that ID is - if the number is zero there is no party member in the first position, and that only happens with an empty party.
Maybe then $gameParty.members().lenght > 0 ?
Yes I've tried the > 0, but the problem isn't the script call, but the eventing of the thing...within a conditional branch it lags a lot to execute
@joket have you seen my answer above?

however
within a conditional branch it lags a lot to execute
that is simply wrong. nothing is faster than that script command, so if there is lag somewhere then it comes from a different source.
If you have problems with lagging, I suggest you show us the full event to check for other errors...
@joket have you seen my answer above?

however

that is simply wrong. nothing is faster than that script command, so if there is lag somewhere then it comes from a different source.
If you have problems with lagging, I suggest you show us the full event to check for other errors...
Hello sorry your reply got lost while I f5 for update the page. Unfortunately eventing isn't good because I have a large number of actors. That's the full eventing. That addrandom is a custom plugin of mine which works. Maybe it's because it waits for the event to finish before executing my plugin?

1630957171390.png
That's an automatic event, if I try to swap that gameparty check on a parallel event it doesn't change the thing it's lagging and the whole thing always goes to the FAILED message (even though I effectively have a full party)
That's the full eventing.
no, that is not the full event. That are only the contents of the event, and all the event properties are missing from that screenshot.
and very often it is exactly the event properties that are needed to understand what is going on, which is why we usually ask for the full event screenshot.

the whole thing always goes to the FAILED message
to which failed message?
because the first thing that looks problematic is that you have two different reasons for fail, and have both of them result in the same message. I strongly suggest you give them different messages to learn which part failed.

second, you should have the "success" result in stopping the event by switching to another event page. At this moment the success will also result in the event starting from the beginning, deleting all actors.

third, what is the reason for the high number of waits in there? Those make no sense at all and are much too high for any parallel or autorun.
add a label - let's call it "start" - before your add random command. Then in the conditional branch, jump to label "start" if the condition is true.
some salty comments of your... anyway: it's just a sample, those waiting times are the time necessary to be sure my plugin is executed. Tried labels but unfortunately don't work. Looks like it's my plugin which lags. Probably I'll just need and evented way to check the thing stopping the flow of the events.
those waiting times are the time necessary to be sure my plugin is executed
That doesn't make much sense, the event handler should automatically wait for any plugin code that it calls to finish before it attempts to execute the next line. You shouldn't need to add any additional wait time in the actual game.

Can you share your plugin code? If it is actually lagging and taking several seconds to execute such that you feel you need those waits, chances are good something is being done incorrectly/inefficiently in there.
That doesn't make much sense, the event handler should automatically wait for any plugin code that it calls to finish before it attempts to execute the next line. You shouldn't need to add any additional wait time in the actual game.

Can you share your plugin code? If it is actually lagging and taking several seconds to execute such that you feel you need those waits, chances are good something is being done incorrectly/inefficiently in
unfortunately can't show the plugin. But after some testing I found it works with some delay sometimes and those waiting times are needed
But after some testing I found it works with some delay sometimes and those waiting times are needed
that still means that you're doing something wrong, because no other plugin needs any waiting time.

without seeing the code no one can do more than guess where you went wrong, but if it needs time before it can work, then it's probably in one of two sections:

either you use an update function for initialising it, requiring that to run several time before initialising is complete - other plugins do NOT use an update loop for that, they place their initialisation into the "new game" segment. That means you have to start a new game after adding those plugins, but prevents the need for waits until the plugin is ready.

the other option is that your randomizer does not use an array-element-availability but simply compares any random choice against any possible case. Those kind of selectors are really bad at finding valid groups if the total list is too small, and you should instead use array elements for validation, removing any used elements from the array.
those are very good hints. Yes it's the plugin maybe but at this point maybe I shall include that check within the plugin itself!

Original thread: https://forums.rpgmakerweb.com/threads/check-if-party-is-empty-conditional-branch.140215/