Self Switches dont work as they should.

what i want :
Guys i want to make an NPC have different dialogs IF you have an item in invetory or not having it, so i used self switches for it.
If you dont have the item he tells you how to find it and changes to switch A afterwards that repeats to you somnething like
" ok go on with your travels" . If you allready have the item when you first meet him he should be like "OHHH you allready have it" then go on self switch A again and say " ok go on with your travels" if you talk to him again.

the problem:
If you found the key anytime of the game and then talked to the NPC he stay FOREVER in loop of self switch and repeats the
self switch forever saying "OHHH you allready have it". This happens cause i tell the NPC say that when you you see player
has the key say "OHHH you allready have it" . But the problem is i want it to be able to go to self switch A and say " ok go on with your travels" not staying on "OHHH you allready have it".

Also if you found the key after he told you how to, i dont want him to say "OHHH you allready have it" I want him to stay in switch A and say " ok go on with your travels". But the guy repeats the "OHHH you allready have it" bybassing the self switch A.
If you have the item the only page that works is the page with (if player has item show tex) "OHHH you allready have it". He cant change switch A afterwards staying in item switch than change to A. He loops forever in that sate.
please if anyone can expalin what i must do to make this work , to make him go to EVEN IF YOU HAVE THE ITEM GO TO SWITCH A cause you allready said that and i told you to change to A. But because you have the item he repeats the if you have the item page.
I really dont know what to do... please help me and sorry for bad english i really dont know how to explain the probbel easy.
Welcome!

1 - I promise you, self switches work.

2 - No one can possibly help you just from that long description. Post screenshots of the event.
F you have an item in invetory or not having it, so i used self switches for it.
why using a self-switch for that at all?
there is a condition specifically "item in inventory" (the bottom condition) for that.

Aside that, as said above self-switches work for everyone else, so obviously you made a mistake with your event logic. Most likely with page priority as that is what many new users mix up.
Posting screenshots would help. I think I understand what you want. Here is what I think you need based on your description.

Your NPC Event needs 3 pages.

Page 1 = No Condition

Do your regular dialog because the player doesn't have the item.

Page 2 = Condition of if specific item is in inventory

If the player has the item, then when you engage the Event, Page 2 will be the highest page where the conditions are met so Page 2 will be active.

Do your dialog the first time for the player having the item. Then TURN ON A SELF-SWITCH A at the end of the Event page.

Page 3 = Condition of Self-Switch A

Now, if the player engaged the Event once while they had the item, Self-Switch A will be ON so Page 3 will now be the highest page where the conditions are met and that is the page that will run every time you engage with the Event.

Engage once without item. Page 1.

Engage again with item, Page 2.

Engage again and forever more. Page 3.

I hope that helps.

EDIT: Forgot to add...Welcome to the forum!
Posting screenshots would help. I think I understand what you want. Here is what I think you need based on your description.

Your NPC Event needs 3 pages.

Page 1 = No Condition

Do your regular dialog because the player doesn't have the item.

Page 2 = Condition of if specific item is in inventory

If the player has the item, then when you engage the Event, Page 2 will be the highest page where the conditions are met so Page 2 will be active.

Do your dialog the first time for the player having the item. Then TURN ON A SELF-SWITCH A at the end of the Event page.

Page 3 = Condition of Self-Switch A

Now, if the player engaged the Event once while they had the item, Self-Switch A will be ON so Page 3 will now be the highest page where the conditions are met and that is the page that will run every time you engage with the Event.

Engage once without item. Page 1.

Engage again with item, Page 2.

Engage again and forever more. Page 3.

I hope that helps.

EDIT: Forgot to add...Welcome to the forum!
Thanks for the help my firend. I found the solution soon after i posted the question.
The problem was the priority of the page... i had the ITEM page on page 3 that way it overlaped the PAGE 2 that had the self witch A... it though that having the ITEM is more importand than been on self switch A so it repeat the line of what he should say when the player has the item... In reallity i never saw a video or soemthign just tryed to found how switches work by my self and thats why i got stuck thinking why did this happen??? the siwtches where perfect so i didnt understand why.
then i saw a video that didnt help on problem and the guy said "wait let me put that event page before the other cause i want the other to have priority" AND I WAS LIKE OMG THE PRIORITY IS THE PROBLEM it though the item was above all and reapeat what the text over and over again...
thanks for the help you really said exactly what the problem was... you understood me even though my post was so hard to understand... thanks

Original thread: https://forums.rpgmakerweb.com/threads/self-switches-dont-work-as-they-should.166632/