Alice Community  

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

Reply
 
Thread Tools Display Modes
Urgent HELP ASAP!!!
Old
Janemba222
Junior Member
 
Status: Offline
Posts: 6
Join Date: Nov 2011
Default Urgent HELP ASAP!!! - 11-27-2011, 12:24 PM

Okay, well this is the deal. I have two things I need to do. . However, I've been pretty confused. I don't know the proper procedures to complete this. Or the proper steps.
I'll just list them as "Projects"
Project 1.

1. Basically, I am supposed to create a Sea world, with a school in which 5 fish are stored in a list/Array. Basically, the fish are supposed to swim in one direction.

In intervals(every 6 seconds), the school is supposed to turn in a random direction. And keep swiming.

My final thing is that I have to make sure that the fish do not go off screen. Basically, modify it so that atleast one fish remains on screen all the time.

PROJECT 2:

2. Make a world with a list or an array that contains bugs. Apparently, when I play the world, the bugs should move pretty quick in different directions. However, it says that if I click the bug, it should dissapear. Furthermore, this "game" is supposed to continue until all of them are done. And it should obviously make it known to me that I have won\

the second step to this is that I'm supposed to modify this world so that in the beginning, the bugs are moving pretty slow. However, each time I click a bug, the other bugs move faster



Anyone know how I can complete these two? Any type of "story board thing"? (basically, list of steps). I'm pretty confused on how to complete it.

Last edited by Janemba222; 11-27-2011 at 07:22 PM.
   
Reply With Quote
Fish Problem
Old
wod4god4
Junior Member
 
Status: Offline
Posts: 1
Join Date: Nov 2011
Default Fish Problem - 11-27-2011, 05:21 PM

I've been working on the same program. I'm not sure if this is correct, but so far this is what I have been able to work out. See the attachment. I hope this helps. I'm still working on it, so if I come up with anything else I will post again.
Attached Images
File Type: jpg Fish.jpg (19.6 KB, 125 views)
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 11-27-2011, 07:18 PM

Hmm, I'm not very good with intervals...Sorry. I'm not sure how to make it not go off the screen. Arty-fishL would know probably.


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
Janemba222
Junior Member
 
Status: Offline
Posts: 6
Join Date: Nov 2011
Default 11-27-2011, 07:24 PM

Quote:
Originally Posted by jediaction View Post
Hmm, I'm not very good with intervals...Sorry. I'm not sure how to make it not go off the screen. Arty-fishL would know probably.
Thanks anyway. I believe I PM'd him( I actually pm'd a few people. Since I read your previous post about how you weren't going to be here for a couple days). In the mean time, I could try Wod/God's method and see if it'll work. OR make some modifications to it so that it'll be correct

However, is there a way you can help me with "Project 2"/ ?

Last edited by Janemba222; 11-27-2011 at 07:27 PM.
   
Reply With Quote
Old
beachbum111111
Senior Member
 
beachbum111111's Avatar
 
Status: Offline
Posts: 852
Join Date: Feb 2010
Location: e
Default 11-27-2011, 07:24 PM

Make a object in the middle of the place, make it an if statement so if the fish are at least so and so away from object fish move to object again.


"Don't lead me into temptation I can find it myself"
   
Reply With Quote
Old
Mr Kidnapper
Senior Member
 
Status: Offline
Posts: 442
Join Date: Feb 2011
Default 11-27-2011, 07:25 PM

One approach to the school of fish is to, if you've created the list already, is to make a For All Together using the list in which a number variable is set to a random number from -180 to 180. If you noticed, 180 refers to degrees, and 180 degrees is a half turn. Unfortunately Alice operates in percent decimals, not in degrees, so you must divide the number variable by 360 to get the proper rotation.
Then you must set a fish to rotate either left or right, it doesn't matter. What this method will do is make one fish turn a random direction, and then go down the list of fish, generating a new random direction each time.
Something like this, except with missiles instead.
missiles.a2w

To do the off-screen bit, you can't just place your camera anywhere you like, you have to set a boundary for the fish. Say you've got four markers in the ground. If your fish are: Under the top marker, over the bottom marker, to the right of the left marker, and to the left of the right marker, then they are OK to move. That is collision. You're essentially creating a wall where they can move no further. It's a bit of an annoying task and I really wonder why your teacher asked you to do this. It's unrealistic to ask of. A good example of this is shown in Sky Warrior X.

PROJECT 2:
This project is an extension of project 1. I can see where your teacher is going with this. He essentially wants you to do the same random movement + bounding box, with the extra event that bugs disappear upon getting clicked.
To do this, you need: Information from Project 1, the isShowing boolean (You set this to false when clicked), A number variable that shows how many bugs there are (This is decremented by one every time a bug is clicked), and a speed factor (A number variable that is used in the Move Forward # meters method).
You can do speed by adding it upon itself by however many meters every time a bug disappears.
After all this, you need an event that says "A Winner is You" or something once the number of bugs reaches 0.
   
Reply With Quote
Old
Janemba222
Junior Member
 
Status: Offline
Posts: 6
Join Date: Nov 2011
Default 11-27-2011, 07:29 PM

Alright, I'm gonna go try the methods right now.

I'll print screen+show in imgur if I'm having trouble

A quick little question: are there any projects similar to "project 2" that are visual? I do much better if I see a visual of it(so that I can perform the steps myself with little issue). Basically, an example type of thing ^_^
   
Reply With Quote
Old
zero00
Senior Member
 
zero00's Avatar
 
Status: Offline
Posts: 300
Join Date: Oct 2009
Default 11-27-2011, 09:13 PM

Quote:
Originally Posted by Janemba222 View Post
Project 1.

1. Basically, I am supposed to create a Sea world, with a school in which 5 fish are stored in a list/Array. Basically, the fish are supposed to swim in one direction.

In intervals(every 6 seconds), the school is supposed to turn in a random direction. And keep swiming.

My final thing is that I have to make sure that the fish do not go off screen. Basically, modify it so that atleast one fish remains on screen all the time.
Make a list for the 5 fish. Use a "For all together" to make them all move and turn at the same time. You could make another list containing 2 directions (left and right) and tell the fish to move in a random direction from the that list.

To keep them on-screen, you could put a dummy in the center and check if fish are out of a certain range. If a fish is out of range, tell it to turn backwards or towards the dummy.

Quote:

PROJECT 2:

2. Make a world with a list or an array that contains bugs. Apparently, when I play the world, the bugs should move pretty quick in different directions. However, it says that if I click the bug, it should dissapear. Furthermore, this "game" is supposed to continue until all of them are done. And it should obviously make it known to me that I have won\

the second step to this is that I'm supposed to modify this world so that in the beginning, the bugs are moving pretty slow. However, each time I click a bug, the other bugs move faster



Anyone know how I can complete these two? Any type of "story board thing"? (basically, list of steps). I'm pretty confused on how to complete it.
Pretty much do what Mr Kidnapper said.
If you click on a bug, set its "isShowing" variable to false and increase the speed the bugs move.

Hope this helps
   
Reply With Quote
Old
Janemba222
Junior Member
 
Status: Offline
Posts: 6
Join Date: Nov 2011
Default 11-27-2011, 09:51 PM

Thank you!

Okay so for project one, I basically substituted the misses for the Fish. And the n I aligned the fish together.


Would you say for project one, I still need to do much else besides getting them on screen? I included an attachment with the fish.

i didn't get to the 2nd project yet but i will soon(After I finish project 1)
Attached Files
File Type: a2w project222.a2w (6.18 MB, 57 views)
   
Reply With Quote
Old
Janemba222
Junior Member
 
Status: Offline
Posts: 6
Join Date: Nov 2011
Default 11-28-2011, 04:56 PM

bump?(mainly if I'm on the right track for Project 1)
   
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 ©2021, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.