[AS 3.0] Game shop question
Hi all,
I'm trying to build a real simple text rpg (in as 3.0) and would like to know how to program a popular functionality that appears on shops.
Let's assume the player has 50 coins and visits a shop. The item costs 100 coins.
How can I make the "Buy Item" button not available (grey out/unable to click) if the player has less coins than the item cost? On the other hand, if the player can afford the item, the "Buy Item" button should be available and "clickable".
I assume this is done with if/else's, but how can I program it?
Thanks.