PDA

View Full Version : Skate park help


foobangdao
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? :confused:

Thanks,

x2495iiii
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.

foobangdao
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.

chickentree
07-10-2013, 08:01 AM
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

In the left top list make sure that "world" is selected.
In the lower left dialog select the properties tab.
At the top of the dialog press the "create new variable" button.
Give the variable a name, something tied to what it is for is usually best, in this case maybe "difficulty" would be good.
Pick the type, for this example we want a number.
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.

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"
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.