How Do You Make It So When You Click On A Button Or Something, The Button Says Yes Or No Depending On How Much Money You Have. Ex: I Want To Buy A Pet (on Scratch) For $60, And I Have 70 How Do You Make It So That If You Have 60 Dollars Or *more* Keyword: *more*... It Will Let You Buy It?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!!?
Last edited by rockerdude (2009-04-09 17:51:55)
Offline
Use different costumes for the buttons... one for Yes, one for No.
Then, in the button's scripts, put some sort of check:
If (UsersMoney > 60)
switch to costume (yes)
else
switch to costume (no)
Then, in the button's click event code, check to see which action should be taken depending on how much money the person has:
When button clicked
If (UsersMoney > 60)
Add (this item) to (users inventory list)
Change (UsersMoney) by (-60)
else
...
Hope this helps!
Last edited by BoltBait (2009-04-09 18:00:20)
Offline
OMG OMG OMG OMG OMG OMG I SO KNEW THAT!!!!!!!!!!!!!!!! HOLY CRUD HOW DID I MISS THAT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I ALWAYS USE THAT TECHNIQUE!!!!!!!!!!!!!!!!!!!!!!!!!!!! But i know why i forgot it! I started this game a LOOOOOOOOOOOOONG time ago, and now I'm trying to finish it. BUT WITHOUT YOU I WOULD OF FORGOT!!!!!!!!!!!! THANKS SSOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO MUCH!!!!!!!!
Offline