Game Development Reference
In-Depth Information
Racket Player 2
To create the racket for Player 2, create a new actor. Double-click this new actor
to edit it in the Actor Editor. Change the attributes as per the following:
Name: Rack Player 2
Size/Width: 16
Size/Height: 120
Color: White
Physics/Density: 500
Physics/Friction: 3
Physics/Restitution: 0
Physics/Fixed Rotation: Checked
Then create the two following rules:
1. A rule named Down. It will be triggered when the ''A'' key is
down (the condition). The behavior will be a Move with a
direction of 270.
2. A rule named Up. It will be triggered when the ''Q'' key is down
(the condition). The behavior will be a Move with a direction of
90.
Last, add a behavior called Constrain Attribute, with actor X constrained to 460.
Now, place your racket on the scene. You can place it approximately as the
position constrain will automatically position it correctly. Your Rack Player 2
editor screen should look like Figure 2-21.
 
Search WWH ::




Custom Search