Event issues

I need help with something, so I have events where you can pick apples and oranges of some trees, the fruit is visible which helps show that the fruit are there. Once you pick the fruits they disappear, however once you go to another map, and re-enter the map the trees are on, the fruits will show up. You can interact, and it will tell you there are no fruits left before fixing itself showing the graphic with no fruit.

I'm sure this is an easy fix though really I am not all that experienced in making games so I'm sorta lost here.

Here is the code + a video of whats going on

1722537544130.png
1722537587341.png

you need to use conditions and multiple pages, not conditional branches on a single page.

make the first page the apple availoable, and the second page the no apply one.
then use the switch you check in the conditional branch as the condition of the second page.

you might have to experiment a bit on what command goes to which page, but that is basically the solution. you might also considering to use self-switches instead of general switches if that switch is not used anywhere else.
general switches are for cases where different events need to use the same switch

EDIT: you might want to work through eventing tutorials as pages are a very important part of events.
I think you should see some examples of creating basic events like doors/chests for example. You need second page with switch AppleX=ON and no grahic there, because "change graphic" does work only for current map and does not save it frame. And it's not a bug, it's just how the engine works.
You have changed the graphics only. When you do this, it will reset when the map reloads.

What you need to do is use a switch. Since you have 1 apple per tree, you can use a self-switch.

Make 2 pages in your event:

Page 1, do everything you did, but when you pick the apple, now you also turn on Self Switch A.

Page 2, leave it empty, without an image, only in the condition on the top left corner, check "Self Switch A"

Now page 1 will show when the self switch is off, and page 2 will show when it self switch is on, which is when you pick the apple. Now it won't reset when re-entering the map.
you need to use conditions and multiple pages, not conditional branches on a single page.

make the first page the apple availoable, and the second page the no apply one.
then use the switch you check in the conditional branch as the condition of the second page.

you might have to experiment a bit on what command goes to which page, but that is basically the solution. you might also considering to use self-switches instead of general switches if that switch is not used anywhere else.
general switches are for cases where different events need to use the same switch

EDIT: you might want to work through eventing tutorials as pages are a very important part of events.
I forgot to reply here to everyone, but thanks! I've been using this a lot now It's great to know how it works ^_^

Original thread: https://forums.rpgmakerweb.com/threads/event-issues.170795/