Charas-Project

Game Creation => Requests => Tutorials => Topic started by: Felix-0 on July 28, 2008, 08:35:28 PM

Title: delete this
Post by: Felix-0 on July 28, 2008, 08:35:28 PM
I'm having trouble posting images on this`lab-top so delete this topic  :eyes:
Title: Re: Bank System
Post by: Prpl_Mage on July 28, 2008, 09:54:32 PM
Posting a screenshot with unnamed variables without any explaination isn't a tutorial I'm afraid.

Describe it step by step so people can understand. At least explain what's going on or it won't help anyone wo actualyl needs help doing this.
Title: Re: Bank System
Post by: Felix-0 on July 28, 2008, 10:15:52 PM
1 the code |$ makes your money appear in a little box
Give it 3 choices
Deposit
ect...
Make these variables
ADD
SUB
Amount in bank

For deposit make a variable called ADD
use Imput number and set store variable to ADD
Add variable Amount in bank by value stored in ADD
Subtract Gold by value stored in ADD
after that set ADD to zero

For Withdraw

Use imput number and store that number in SUB
subtract variable Amount in bank by SUB
Add Gold by variable SUB
after all that set SUB
to zero


Title: Re: Bank System
Post by: Rahl on July 29, 2008, 12:09:13 AM
Well Felix theres some problems with your script if you dont mind me saying so:

1st: And most important, theres no safety system. I could just go in and deposit 9999999999 and it would let me and only take me down to 0 gold, but afterwards I could just withdraw 9999999999 gold and come out even.
2nd: Your withdraw system alls your numbers to go into the negatives, so I could just withdraw 9999999999 without any consequences and my bank account would just be -999999999.
3rd: To stop these things from happening you would have to have conditional branches to check to see if theres that much money held by the player, and conditional events to make sure that the stated amount is not more than the bank has.

Just some big bugs I found with this.
Title: Re: Bank System
Post by: Felix-0 on July 29, 2008, 12:56:01 AM
I knew I was forgetting something...I'll just post it staraight from my game at my friends house....next time I go over there