Trying to make a simple trade event

Hi I just bought MV and I'm practicing the basics. I am following the tutorials that come in the game, and I just decided to to take what I have learned so far, and make a cat kind of close to the tree where the 3 people are in a row that you code to give you a potion/check if you have a potion/take your potion.

Well, I wanted to make a cat that asks you a yes or no question, if you tell him Yes, he will take 1 potion from you and give you stimulants. I suppose I could post a picture to show you the disaster I have coded thus far.

Spoiler
kitty_meow.png
That looks fine. The only thing I can see that might be causing you problems is that conditional branch "if 0001 is ON" - unless one of the other events turns switch 0001 to ON, he won't give you the stimulants/take the potion.

If you're trying to have it so he'll only give you the stimulants/take the potion if the party has a potion, then instead of "if 0001 is ON", go to the fourth tab in the conditions box and click "item" and pick "Potion" from the drop down list. Then, it will read "If Party has Potion" instead of "If 0001 is ON".
This isn't working so well. When I try to trade him a potion without a potion, he gives me both the excited meow and the not excited meow.

I intended for him to give me the not excited meow when I agree to his conditions and don't have a potion.


And is there a way to make it to where I can only make this deal once?

Spoiler
kitty_dealer.png


mega edit madnesss.. put the wrong picture in there there.



Mega Edit madness continued!!

*Crowd cheering* Ahhhh.. finally I learned something useful.. I had to put the excited meow AFTER the check to see if I had the potion..

Spoiler
kitty_dealer2.png

That doesn't solve the trading him the 1 potion for 14 of his cat dru.. I mean stimulants over and over again though.
Do not use leading zeros when giving the ID of switches/variables etc. That should just be a simple 1.
Also, double check if any of your plugins is using switch 1. Many use that as the default, and you have to change them to something else (and name them so that they don't get reused for another purpose by mistake).

To make this happen only once, the simplest way is to put a self switch after each individual choice, all of which take you to the next page. That page is conditioned by the self switch, and you just need to put the graphic in again and have the cat do something else e.g. say something, just meow, whatever.
To make this happen only once, the simplest way is to put a self switch after each individual choice, all of which take you to the next page. That page is conditioned by the self switch, and you just need to put the graphic in again and have the cat do something else e.g. say something, just meow, whatever.

I'm not really sure how to do this.. XD. Sorry I'm kind of newbtastic at this. Loving it so far.
Before going on to explain how to do this, can I strongly recommend that you have a look at Andar's compilation of info for new users. Among the excellent things there are links to 2 playable tutorials, one for Eventing and one for Switches and Variables. Playing through those will give you a firm grasp which will save you a ton of time and frustration in the future.

Give me a few minutes to do an example for you, take screen shots etc. I'll come back and edit this.

EDIT
@Sauteed_Onion Here is a simplified example.

Page one of your event, notice the self switch after you have exchanged the items. Obviously I don't have stimulant, I've used herbs instead.
example 01.png

Page 2 - I have highlighted where you need to make the condition for the page to run. The engine reads pages from highest number to lowest and stops at the first one it finds where it can meet the condition. So, because it finds a page conditioned by the A switch, which is now ON, it stops there and never runs page one again.
Example 02.png


Hope that makes sense.
Having re-read the earlier posts, I see that the switch ID was on the condition, not in your event commands, so forget that blurb about not putting in the leading zeros, the engine does that automatically in that box.
Hmm, when I make this event, the cat does not appear at all when I play test.
Then show us Screenshots of what you have now.
Most likely you made a mistake with the conditions top left, because if no conditions is met the event won't appear.
Spoiler
kitty_dealer_insanity.png

Yeah it was confusing me. I had to uncheck the switch box in the upper left, and when I tested after that, it worked like opening a can of tuna for a hungry kitty. He showed up and traded me some stimulants and refused to give me that sweet deal again.

Thanks guys, this little bit of practice has showed me some pretty nifty stuff. Thanks for all the help. I'm gonna check into Andar's tasty tutorials tomorrow.



For really real real. THANK YOU GUYS so much for stumbling through this with me.
^ ^

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-make-a-simple-trade-event.88765/