Alice Community  

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

Reply
 
Thread Tools Display Modes
Add objects to screen during animation
Old
marcus1320
Guest
 
Status:
Posts: n/a
Default Add objects to screen during animation - 10-17-2010, 07:12 PM

I am trying to ask a user to input how many fish to add to the screen. After a user has inputed a number, how do I get that number of fish to appear? Do I need to make a certain number of fish beforehand and then have them become transparent? Kind of stuck.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 10-17-2010, 07:44 PM

Yes, that is exactly what you would have to do. As you would imagine, you have to create only a certain amount of fish, maybe 20 or so. You can create hundreds if you want, but it is unnecessary and time consuming, I would suggest a low number like 10 or 20 and tell the person what the max is.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Recalling fish
Old
marcus1320
Guest
 
Status:
Posts: n/a
Default Recalling fish - 10-17-2010, 10:23 PM

I am able to get my fish to disappear and then ask a user for a number but can not get that number of fish to reappear? What am I possibly doing wrong. I have my fish in a list that I am trying to recall only the user inputed amount back on the screen.
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 577
Join Date: Nov 2008
Location: In the interwebs
Default 10-17-2010, 10:25 PM

Try making a list of the fish, and then ask for the number. Now loop to that number, each time making the next fish in the list appear.


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
Not clear
Old
marcus1320
Guest
 
Status:
Posts: n/a
Default Not clear - 10-17-2010, 10:46 PM

I am not sure if I understand what you mean? what would the pseudocode look like?

Last edited by marcus1320; 10-17-2010 at 10:49 PM.
   
Reply With Quote
Got it
Old
marcus1320
Guest
 
Status:
Posts: n/a
Default Got it - 10-17-2010, 11:12 PM

I think I got it figured out. Thanks everyone for the help.
   
Reply With Quote
Reply

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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.