Submit Your Article Guild Wars 2 Forum RPG Maker VX.com
 
RPG Maker
 

 Username:
 Password:
   Not a member? Register!



Home > Tutorials > RPG Maker VX > How to make a Bank.

How to make a Bank.


Hello and welcome to my tutorial. I am going to try and explain how to create a bank chest where you will be able to store your gold at.
1. You will be able to withdraw an amount entered.
2. You will be able to deposit an amount entered.
3. You will be able to check your bank balance.

Okay, now. I'll try explain as much as I can and try not to get anyone lost. :D

1. create an event where ever you want the bank to be. Choose a reasonable sprite for it. Name your event Bank or something like that just so you know what it is :)

2. Ok, now insert a new command. This will be "Show choices" This will alow you to choose to Withdraw, Deposit or view your bank balance. So in the choices enter Withdraw, Depost and Balance.

3. Insert Text under Withdraw, this will say something like "How much do you wish to withdraw?"
Next Insert "Imput Numbers" in the settings for this choose variable 1 and rename it to "Bank withdraw". I put 7 digits for mine.

4. Next we will insert a conditional branch after the "imput number" command. Click variable in tab 1, click the first box and create another variable "bank balance". then click okay and set it to "Greater than or equal to" then click variable and choose variable "Bank withdraw".

6. Next create a change gold command. set it to increase and click variable and set it to "Bank withdraw".

7. Insert text and make it say something like You have successfully withdrawn V[x]G. (The x will be the number your bank withdraw variable is)

8. Insert control variables and set variable Bank withdraw to 0. Thats it for that bit but for "else" we need to make it say something like. "You do not have enough money stored" or something like that.

9. Okay now up to "when deposit" insert text and make it say "How much do you wish to deposit" click ok then insert Imput numbers again. Make another variable and call it Bank deposit. I put the digits on 7 again. Create another conditional branch. Now goto tab 1 again and choose variable. we will have to make another variable. this will be called "player gold". click ok and set to "greater than or equal to" then choose variable and set it to "bank deposit". Press ok.

10. decrease gold by variable "bank deposit". then insert control variables. this will be "bank balance" add variable "bank deposit". insert text saying "you have successfully deposited \V[x]G. (x being bank deposit) Control variables "bank deposit" 0. Else insert text, "You do not have that much money"

11. Now when they choose balance all this is, is insert text and make it say "You're balance is: \v[x] (x being bank balance)

Now we fially completed that event. but uh oh? it still doesnt work correctly. This is being the variable player gold isnt doing anything. Open your database and goto common events. Create a new common event call it player gold set it to parellel and make a new switch call it player gold. now insert a command control variable. player gold set to other "gold".

The way i did it is when i first started the game i set player gold switch on so it activates straight away.

I really hope this helped anyone who needed it.

I would put up pictures and all that sorta stuff but this is the first tutorial ive done so if any one needs help just message me :) Ill help whenever i can.

Details
Tutorial: How to make a Bank.
Date Listed: Mon, 16 Nov 2009 06:58:45 -0500
Author: beggsz
Total Hits: 3525


Embed
Short URL:

HTML:

BB Code:



RPG RPG Revolution
RPG RPG Revolution is your #1 stop for game development and console RPG games, as well as those created by people like you. Link to us to support us, so we may grow to be better website community for you.

RPG RPG Revolution is an Privacy Policy and Legal