• Announcements

    • RagingHobo

      Forum Upgraded!   07/17/2017

      We have successfully upgraded our forum to the latest version! Some things have moved around but don't worry everything is still there, we still need to find updated versions of the plugins we were using previously to restore everything to the way it was. There will be a running topic in the Feedback and Support in case you notice something wrong. Before you do so please clear your browser cache and close your browser completely to rule out a caching issue. Thank you for your patience during the outage and while we get everything back to 150%  
Sign in to follow this  
Followers 0
Dark Messiah

Input Number Issues

9 posts in this topic

Hello all!

I would like to set up a sort of donation bowl at random churches in my game. So far, I've got it so that when you click on it, it does a check on your current money. Then when you go to decide how much you want to donate, I use an Input Number option, then subtract that variable from my current gold. Only problem is that there is no limit, it seems. Heres an example:
 

inputnumber-1.jpg

 

 

If you look at it, I can basically set the number to whatever I want, despite my current money count. Then when I go to donate again, that number sticks, even though I didn't have enough. I was hoping someone knew a way around the events to make it so that when you go to input the number, it can block you if your funds are insufficient.

Share this post


Link to post
Share on other sites

Well, I had it set up that way already. The part where if your gold is > 0, then continue to the event. It's more or less being able to donate MORE than what you have. I wouldn't wanna restrict the user from being charitable enough to donate everything s/he has, but you can't donate what you don't have, ya know? It's like overdrawing your bank account, except there's no negative number, it just stops at 0.

Party has 50 yen.

Donate 60 yen to the bowl.

0 yen left in the party, but donation bowl has 60 yen now. The numbers don't add up.

Edited by Dark Messiah

Share this post


Link to post
Share on other sites

Sounds like you've done something wrong with your variable/gold checking - post a screeny of the event commands

Share this post


Link to post
Share on other sites

Your variable 6 is called 'Party Gold' but I don't see anywhere that sets that variable to be equal to the party gold.

Using Control Variables you need to set the variable to Game Data > Other > Gold every time before using the variable

Share this post


Link to post
Share on other sites

Oh really? I only did that once, and that was in my starting maps (the ones I do to set up the premise and Character Creation script), along with any other variables that I anticipated would be recurring, like my character class variable I had asked about previously, or the player's current battle count. So I have to set the variable to the Gold every single time? Cuz I just realized a Common Event will combine all the churches into one event, so I'll have to separate them with a different variable for every church.

Edited by Dark Messiah

Share this post


Link to post
Share on other sites

as galv said. variable that store party gold need to be updated before you make comparison with donated money. game variable don't update by itself. unless you use script for the conditional branch and use $game_party.gold

example conditional branch from above your case (put in script box in conditional branch)

 

$game_variables[9] >= $game_party.gold
Edited by estriole

Share this post


Link to post
Share on other sites

I think I got it!

 

 

donationbowl.jpg

 

 

After adding a few conditional branches, I was able to get it to function properly. I tried this with a duplicate event using a second donation variable, and they kept separate amounts! So, not sure if this would be useful for anyone, but follow this structure and it should work! I even set it so that the Reputation doesn't get spammed like crazy every time you donate. Now it will only work on newly activated donation bowls. The self-switch trick was actually picked up from Galv's Multiple Containers script, so thanks for that little tip as well. :P

Thanks for all your help, guys!

Edited by Dark Messiah

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.