Okay, so you are unclear on how it is not working, does the interest simply not happen? Does it not work the way intended? Also 10% gold increase every 10 seconds is really going to break your game.
This should do it, though it is a bit bulky. I could not get it to set the variable to anything but 0 with a script call.
Thanks i found another way to get these done.
Yeah 10sec it just example...
:D
It's a little hard to follow your Banking event since you've only shown part of it. However, I think what's going wrong is that your Interest event is reducing the amount of gold in the player's bank account instead of increasing it.
The most direct solution is to multiply the player's account by 110 rather than 10, before dividing by 100. That way, they have 10% more money in their account after the parallel process event runs, rather than having 10% of what they started with.
The above solution is by far the simplest way to get it done. However, if you are trying to track Interest separately from the "Principal" amount (the amount that the player originally deposited), what you will need to do is create a few new variables: "Interest this Period", and "Total Interest". Each time the event runs, set "Interest this Period" equal to total interest, then divide Interest this Period by 10, then add that amount to the Total Interest sum (Total Interest += Interest This Period). Then, set "Interest this Period" to the Principal amount, then divide Interest this Period by 10, then add that amount, also, to the Total Interest sum. This will allow you to track Principal and Interest as two separate amounts in case you want to display to your player how much Interest they've earned.
Finally, let me give you one unsolicited piece of game design advice: there are very, very few games where allowing Bank Accounts with Interest is a good idea. In general, it is going to completely throw off any control you have over the balance of your game economy, and allow players to amass enormous sums of wealth that allow them to buy anything and everything instead of needing to make tough decisions. Additionally, you will be rewarding the player for sitting around and doing nothing, meaning that the player will likely sit around and do nothing (perhaps walking away from the game while it runs) in order to boost their bank account. It's unlikely that you want your player to do this, so be really careful about adding a system like this into your game, even if it sounds cool in your head.
Thanks for the advice yeah i'm aware player can decide to afk and do nothing for getting money..
but it's fine for me.. though i would set the time interest around an hour to get those interest money.
btw, i got problem when excuted the event..
the gold player deposit increased for 10% yeah.. but its not their money
here's example : player deposit 1000gold and every 10sec player get money 100, total 1100
but the next one player will get 1210 insted 1200, since my english quite bad XD
i cant describe what problem is.. but i think the problem lie on variabel.
is there a way to seperate variabel for interest and amount i get from interest
and those seperate variabel increase based on interest player pay,
for example variabel interest 1000
variabel temp interest 100
so instead interest + 100, the amount of interest will stored in temp interest?
i hope you guys understand.. my english really bad so i cant explain the problem really good to you
:(
