Alice Community  

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

Reply
 
Thread Tools Display Modes
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 01-10-2010, 03:13 PM

I have no idea why the if/else statement is not recognizing the number, so I did something really weird, but it works. I made the 3D text set it's text to the random number that is generated, and then I had an if/else statement for each random number, and then the turtle moves the the corresponding knife. I made it 1-15, but you can make it all the way to 44 is you would like. I also added some other methods to make it work. Even at 1-15 it is challenging, but I got the entire game working, just follow my lead with the other knives.

Tell me what you think please, and if you do not understand a certain part of it, ask me.
Attached Files
File Type: a2w turtle game1.1.a2w (1.47 MB, 25 views)


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

Last edited by Dameria; 01-10-2010 at 03:26 PM.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 01-10-2010, 03:31 PM

I wont laugh, because i know you put yoru effort into this, ive seen a lot of Alice games, so good ones and some great ones, none are bad they just need work


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
thearun
Guest
 
Status:
Posts: n/a
Default 01-10-2010, 03:31 PM

It works great. Thanks so much. But how'd you figure this out? Seems so complicated? I'm sorry if it took a lot of time.

Now i have to figure out how to make the scoreboard and more importantly the scoring system. Wish me luck. Thanks.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 01-10-2010, 03:33 PM

what was your problem with this game again


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
thearun
Guest
 
Status:
Posts: n/a
Default 01-10-2010, 03:35 PM

Well my original problem was i wanted to get some sort of random motion for the turtle, and the way i did it with the if/else statements wasn't working. Its in the first attached file on the first page if you want to take a look.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 01-10-2010, 03:38 PM

If you need help with the scoring I could help. Also I had a great idea about maybe levels? I know a way where you can have it be level 1 where it goes slowly to each knife, and when you click ten times, it advances in level, so that it gets harder exponentially, and you could even do a time limit if you wanted.

It would be very complicated and I don't know if you will understand it, but it is possible.


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
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 01-10-2010, 03:38 PM

I saw it, and yes i see your version and version 1.1, hmm, the random is working but after a while it stops


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
thearun
Guest
 
Status:
Posts: n/a
Default 01-10-2010, 03:41 PM

I think i could do that. You'd have to use while statements and make it so while the score is =< 10 or something the duration of each move to would be set to a smaller number?
right nowi have to start working on an essay thoughD:
   
Reply With Quote
Old
thearun
Guest
 
Status:
Posts: n/a
Default 01-10-2010, 03:43 PM

Quote:
Originally Posted by jediaction View Post
I saw it, and yes i see your version and version 1.1, hmm, the random is working but after a while it stops
Yea, i dunno. It's just really weird. I guess that's computers for you? But now it works so, i'm good. I'll try and figure out why it didn't work when i have time.

Oh the stopping in Dameria's version is because I still have to add the rest of the knives and loop it.

Last edited by thearun; 01-10-2010 at 03:46 PM. Reason: addition
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 01-10-2010, 03:43 PM

No thats not how you would do it, and Jediaction it stops only when you click the turtle 10 times. Other than that it could stop temporarily because it picked the same random number twice, but then after that it should start going again. When a larger number like 44 is in there, the chances of it stalling would be much less.

EDIT: I just had it running for 5 minutes straight and it never stopped for me. Once you finish the game however, which is to click the turtle 10 times, then the turtle stops moving. I did that intentionally because that is the point to winning the game.


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

Last edited by Dameria; 01-10-2010 at 03:53 PM.
   
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 ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.