I want to make a ATM. The reason for that is to put your money inside the ATM. If you get a game over, then you lose half of the money you have unless you had $0 in which nothing would be taken.
The question is how do I make a ATM, and how do I set it so there's that money taking death penalty?
As far as the ATM, somewhat simple if you know what you're doing. Basically, you have the ATM event, then if you want it where you automatically lose all of your money, go into "change gold" and make it set to a variable for the player's gold. Then make a variable for the bank's gold and set it to the player's gold.
If you have it where the player can choose how much they want to deposit, that's going to be a bit trickier, because you'll probably need a visual component to actually show that the player is losing/gaining money. But as far as the technical stuff goes, it's basically the same, but you have to check for player input. Here's the event format for the whole thing.
Show Text: Press the up button to take money, press the down button to deposit money. \$
Conditional Branch: up button is being pressed
Conditional Branch: bank > 0
Control Variables: gold += 1
Control Variables: bank -= 1
Else
Play SE: buzzer
Show text: "There is no money in the bank."
Branch End
Conditional Branch: down button is being pressed
Conditional Branch: gold > 0
Control Variables: gold -= 1
Control Variables: bank += 1
Else
Play SE: buzzer
Show text: "You have no money."
Branch End
As far as losing money after dying, it depends on how you have your battles set up. If it's a random encounter, you'd need a common event triggered when the party is defeated. If it's predetermined (i.e. setting up battles via event commands), you set it to "continue if lose", subtract the amount of gold the player has / 2 (you would need to make a variable command prior to doing that though, which sets another variable = the player gold variable / 2) Then you go to the game over screen immediately after.
Oh. I never interpreted it as the bank taking your money when you die. I just imagined it as you losing it, so you deposit it in the ATM to avoid losing money when you die. Or maybe I'm being stupid, I really don't know.
in pokemon, when you lose a battle, you must pay the other trainer. this is a similar concept.
I made this as a common event for one of my games several years ago. It works great, and I even have a similar one for MV that adds interest at certain intervals, much like a real life account.
This shows why we keep on suggesting that people do one query in one thread. Having 2 queries in the same thread can easily lead to this sort of confusion.