Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Desperately need help with a project
Old
Shotgundiplom4t
Junior Member
 
Status: Offline
Posts: 1
Join Date: Nov 2011
Unhappy Desperately need help with a project - 12-07-2011, 04:36 PM

Here's the deal. I have a project that's due next Wednesday. I'll post a copy of the world so people can see what I'm working with. The basis of the assignment is that I need to create a small program in which a rabbit tries to withdrawl money from an ATM in the side of a tree using variables, such as reporting a balance, depositing and withdrawing from and having those respective changes reported. (The ONLY I really know is that the rabbit is supposed to contain the variable to display the balance, and that withdrawls are not supposed to be allowed if the balance is 0.) I've figured out a few very basic things, but I'm very new to alice, and this assignment, while probably very simple, is killing me.
I am not asking for someone to do my homework for me.
I just need someone to point me in the right direction, or maybe give me some examples. Please help, because I'm not getting very much in school...
Attached Files
File Type: a2w ATM.a2w (874.7 KB, 8 views)
   
Reply With Quote
Old
GameKid
Senior Member
 
GameKid's Avatar
 
Status: Offline
Posts: 467
Join Date: May 2011
Location: My magnificent castle
Default 12-11-2011, 10:51 PM

Use the ask a user for a string function in the world's functions for starters. Just take a good look at the world's functions and you'll be alright.


[COLOR=e4eaf2]Your text here[/COLOR]
Come on, you know you want to try it.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 12-12-2011, 10:17 PM

Here's my take on it. Lots of cool stuff added, but not quite done. It still doesn't tell the user when they've withdrawn too much or deposited too little.

That'll be your job.
Attached Files
File Type: a2w ATM Thingy.a2w (1.65 MB, 1 views)


(')>
   
Reply With Quote
Deposits and Withdrawals...
Old
todd0312
Member
 
todd0312's Avatar
 
Status: Offline
Posts: 35
Join Date: Sep 2011
Default Deposits and Withdrawals... - 12-13-2011, 12:58 PM

Well, I am a noob, too, so if my advice is flawed, hopefully someone else will point out any said flaws.

What I do know is that you will need number variables for deposits, withdrawals, and balance. It would probably be a good idea to have separate methods for each. Create an event for each of these - so that when the user clicks on the words: balance, withdrawal or deposit, that method will be called.

Like GameKid wrote, you will need to use a world function to ask the player questions: yes/no, number or string (letter(s), words, etc).

I added some code to your project to ask the user how much they would like to withdraw when they click the text "Withdraw" and then print the answer - with a pretty long explanation of how I did it, so you can understand what GameKid was talking about a bit better.

Hope this helped a little.

Todd
Attached Files
File Type: a2w ATM.a2w (902.4 KB, 7 views)
   
Reply With Quote
Hmmm... maybe I took too long to post.
Old
todd0312
Member
 
todd0312's Avatar
 
Status: Offline
Posts: 35
Join Date: Sep 2011
Red face Hmmm... maybe I took too long to post. - 12-13-2011, 01:00 PM

I see someone much, much more advanced than me just answered your post. Sure it will be more help than mine, but maybe mine will help a little anyhow.

Take care,

Todd
   
Reply With Quote
Reply

Tags
variables

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.