How to make an NPC only give you something if you have enough gold?

So, I think right now I have a really basic understanding of switches. I made a skeleton metal artist that can sell you a T-shirt, and refuses to sell you more than one. However, how do I make it so he refuses to give you a t-shirt if you don't have enough money? In this case, he requires 15 gold. Here's some pictures of the event.


Event.PNG


Event1.PNG
You have to use a conditional if statement. I assume the feature is a part of Ace. It should allow you to choose an if statement like "if gold is < 15 then show this message." Something along those lines.
Example Event.png


Example Event2.png
Not really relevant to the question at hand, but I'd suggest using a Self Switch for this, rather than a global Switch. Since the switch only affects this event, it's better to use a Self Switch. Global Switches are for when multiple Events use it, such as when one Event sets a switch, and one (or more) different ones check it.


There's nothing inherently bad about using the global switch the way you are, but there are two potential downsides: 1- you only have so many switches; use too many, and you'll run out. 2- Your list will get cluttered with too many switches that don't need to be on the list, and it could be hard to find the one you need.


Of course, if other things reference that switch, then ignore this, and continue using the global one.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-an-npc-only-give-you-something-if-you-have-enough-gold.62001/