Alice Community  

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

Reply
 
Thread Tools Display Modes
How to up the score?
Old
zackpier
Guest
 
Status:
Posts: n/a
Exclamation How to up the score? - 04-23-2010, 06:30 AM

This is my second question on this project. I am almost completely finished but I would like to know how I can implement a score into my world. I have it split between two 3d text's. ("Score:" and "0"). What would I use to make it to where for every second the player doesnt crash, the score goes up? (My game is kinda like a flight simulator? just has a plane flying)

Thanks
-Zack
Attached Files
File Type: a2w fly (1).a2w (4.45 MB, 8 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 04-23-2010, 08:12 AM

I made an example once on this. Its the second comment on the page

http://www.alice.org/community/showthread.php?t=3755


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 04-23-2010, 09:27 AM

Or you can see the maze that I created for this person. It has exactly what you have, a text for "Score:" and a text for "0", and 0 increments by 5 every time a lollipop is clicked on. Then at the end you get a time bonus that increases your score:

http://www.alice.org/community/showthread.php?t=4280

I'm sorry jediaction, but mine is a lot better than yours. Yours would take way too many if/else statements where as mine is just 2 lines of code repeated every time you score a point. Yours is just too space-consuming, and with a large game it would considerably increase the file size.


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; 04-23-2010 at 09:40 AM.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 04-23-2010, 10:29 AM

Now your trying to step on my toes


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames

Last edited by jediaction; 04-23-2010 at 10:44 AM.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 04-23-2010, 10:35 AM

Hey, I'm just saying that yours takes a lot more work than it needs to be. Also, this way the score can be kept as a variable that can be accessed by other methods later on whereas if it just kept changing the text, and it would make things harder from there.


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 04-23-2010, 10:35 AM

I realized that but im best at my way. End of conversation


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
zackpier
Guest
 
Status:
Posts: n/a
Default 04-29-2010, 07:29 AM

Quote:
Originally Posted by Dameria View Post
Or you can see the maze that I created for this person. It has exactly what you have, a text for "Score:" and a text for "0", and 0 increments by 5 every time a lollipop is clicked on. Then at the end you get a time bonus that increases your score:

http://www.alice.org/community/showthread.php?t=4280
Thanks for everything..
I got half of what you did for the score.
I got the world.points to set value to world.points + 1, but i was unable to get that to affect my score text. could you take a look at my world and put in the "set text to" command, because I am unable to find it. I just barely found the "set value to" command.
Attached Files
File Type: a2w fly (1).a2w (4.45 MB, 2 views)
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 04-29-2010, 03:57 PM

Is this better? I just made the points count up every 0.1 seconds. I wouldn't change the 0.1 seconds if I were you, because the if statement will only loop after those amount of seconds have gone by. For instance if it was a full second, the jet might be fully underground in the time that the if statement is waiting for the second to be over, and it would not count as a crash until the if statement is looped again. If it was 5 seconds it would be even worse because you could be under the ground a whole 4 seconds before the if statement could determine that the jet has crashed. Either keep it a low number on the wait, or add a different if statement that checks to see when the plane crashes. I wish I could make this a little less laggy also.
Attached Files
File Type: a2w fly (1).a2w (4.45 MB, 6 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
   
Reply With Quote
Reply

Tags
flight, fly, plane, score, simulator

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.