• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Question] ALL switches in one event being turned on when the condition isn't met?! (V17.2) (Solved)

I'm not going to explain why I'm trying to do what I'm trying to do. That doesn't matter.
This is the event:
Spoiler:


What I WANT to happen, and what it looks like should happen is

Spoiler:



What is instead happening is the second I interact with the event, EVERY switch in the event turns on, rather I select an item or not. Not only that, but one item of every $PokemonBag.pbDeleteItem script I have in this event is deleted regardless of if I choose it or not.

Here's proof that every switch in the event is being turned on at the same time:
Spoiler:


Since it's a conditional branch I don't see why this is happening when the switches shouldn't be turning on unless the condition is met.

This also happens when I select an item that's in the event, which is why I believe that the event is somehow ignoring the condition it needs before turning on the switches the second I interact with it. But why would it do that?

I'm not going to accept "just use PBBerry" or whatever that script is called as an answer. It doesn't matter what the item is. I'm going to want to use this kind of thing for items that aren't berries later, if I can get it to work.
 
Last edited:
You seem to be doing it wrong.

When you say:

pbIsBerry?(PBItems::ORANSEED)

What you are checking is if Oran Seed item is a berry, which is always true because in PBS, the Oran Seed is defined as a berry. Same goes for the rest of your conditional branches.

What you should be checking in the conditional branch after choosing item from bag is:

(pbGet(5))==getID(PBItems,:ORANSEED)

Then after setting graphic, you should exit event processing so that the rest of the conditional branches aren't checked after the graphic is changed.
 
You seem to be doing it wrong.

When you say:

pbIsBerry?(PBItems::ORANSEED)

What you are checking is if Oran Seed item is a berry, which is always true because in PBS, the Oran Seed is defined as a berry. Same goes for the rest of your conditional branches.

What you should be checking in the conditional branch after choosing item from bag is:

(pbGet(5))==getID(PBItems,:ORANSEED)

Then after setting graphic, you should exit event processing so that the rest of the conditional branches aren't checked after the graphic is changed.

That works! Thank you!
...Why isn't this solution in the WikiDocs under "manipulating items"?
 
Back
Top