Game Development Reference
In-Depth Information
Figure 3-7. P2 score
Go back to the Scene Editor and drop P1 Score and P2 Score on the scene.
Before jumping to the next paragraph, you need to free up the memory once the
point is made. To do so, use the Destroy behavior on the ball itself.
Open the Ball in the Actor Editor and create a new rule. Name the new rule
Destroy. This rule will have two conditions but with an ''Any'' of those
conditions. To have the Any option, click the ''All'' in ''When 'All' conditions are
valid'' and select ''Any.''
The first condition is ''Actor receives event'' and ''overlaps or collides'' with actor
of type ''Left Winning Zone.''
The second condition is very similar: ''Actor receives event''and ''overlaps or
collides'' with actor of type ''Right Winning Zone.''
Then, drag and drop a Destroy behavior. There is no option setting for this
behavior. When any of the conditions you previously made are valid, it will
destroy the instance of the actor. Your rule should look like Figure 3-8.
 
Search WWH ::




Custom Search