Game Development Reference
In-Depth Information
Your rule should be similar to Figure 4-12.
Figure 4-12. Right movement rule
Lastly, create a rule to spawn a ball actor when the screen is touched outside of
the actor and when there is no active ball.
Click Create Rule and add the condition ''Actor receives event'' ''touch'' is
''outside.'' Add a second condition to check the game.ActiveBall attribute. The
condition will be ''Attribute'' ''game.ActiveBall'' is ''false.'' Drag and drop a
Spawn Actor behavior and change the settings to:
Actor: Ball
Layer Order:in front of actor
Direction: random(75,135)
Relative to: actor
Position: 0, 10
Relative to: actor
Drag and drop a Change Attribute behavior and change game.ActiveBall to 1.
Your rule should be similar to Figure 4-13.
 
Search WWH ::




Custom Search