Alice Community  

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

Reply
 
Thread Tools Display Modes
Skate park help
Old
foobangdao
Junior Member
 
Status: Offline
Posts: 2
Join Date: Jun 2013
Location: nah
Default Skate park help - 07-08-2013, 04:11 PM

Hi All,

I am trying to make a program where the user chooses which skater gender m/f and difficulty level to attempt novice/normal/hard. Depending on which difficulty level is selected, the skater will try to jump a low/medium/high ramp. And to make it even more interesting, the skater will fall randomly and say something. Can some1 help me with how to get this started?

Thanks,
Attached Files
File Type: a2w Skate Park.a2w (2.60 MB, 5 views)
   
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 07-08-2013, 05:30 PM

What do you want to learn first? It's a long list of stuff to cover, and it's best handled one at a time.


(')>
   
Reply With Quote
Old
foobangdao
Junior Member
 
Status: Offline
Posts: 2
Join Date: Jun 2013
Location: nah
Default 07-08-2013, 05:47 PM

I would like to do the initial selection process parts, male/female skater gender and novice/normal/hard difficulty.
   
Reply With Quote
Three Things + 1 todo
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 210
Join Date: Dec 2012
Location: Frosno, Ca
Default Three Things + 1 todo - 07-10-2013, 08:01 AM

Quote:
Originally Posted by foobangdao View Post
I would like to do the initial selection process parts, male/female skater gender and novice/normal/hard difficulty.
1. Learn about variables to do this first part you need to understand what a variable is how to make them change them and use them.
  • Variables are place holders.
  • Variables are created with a certain "type" numbers, Booleans, objects ...
  • The value that the variable is holding can be retrieved (Get) or changed (Set.)
So
  1. In the left top list make sure that "world" is selected.
  2. In the lower left dialog select the properties tab.
  3. At the top of the dialog press the "create new variable" button.
  4. Give the variable a name, something tied to what it is for is usually best, in this case maybe "difficulty" would be good.
  5. Pick the type, for this example we want a number.
  6. Select OK to close the dialog
The variable should be visible above the "create new variable" button.
Now PLAY until you understand what is going on.
  1. At the bottom of the right side grab "print" and drag it to the "world.my first method" method. In the pop-up select "object"
  2. Now select the variable "world.difficulty"
Run the movie and look below the screen, you should see the value of your variable.
Grab the variable and drag it into the method. Choose "set value" and give the difficulty variable a new value.
Copy the print instruction and move the copy below the "set" instruction.
Run the movie.

So the variable "difficulty" is a number that you can use to set the difficulty of the game. For example: Move skateBoarder up 1 meter duration 5/difficulty. Here, the larger the number the faster the skateBoarder character will move.

Add your two skateboarders to the movie and create a variable of type "object" to hold the selected skateboarer.
Write a method to do something using one of your skateboarders when it is working replace the skateboarder with the variable you created. Now changing the value of the variable will change the skateboarder who is being used.
   
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 ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.