Game Development Reference
Figure 3-1. Left Winning Zone attributes
Now add some rules and behaviors to that actor.
The first rule will detect the overlap between this zone and the ball. Create a rule
and name it Ball Detection rule. The rule is ''Actor receives event'' and ''overlaps
or collides'' withactor of type''ball.''
Drag the Change Attribute behavior into the rule. Change the settings to Change
Attribute: game. P2 Score. Then, use the Expression Editor (the little icon
located to the right of To:) to self-increment by 1 the P2 score attribute. You
expression must look like Figure 3-2.