Game Development Reference
In-Depth Information
Figure 5-14. Bullet change velocity
The next step is to destroy the actor when it collides with an enemy or as soon
as it is no longer visible on the screen. You will know that the bullet is not visible
by detecting its Y-axis value.
Create a new rule and name it ''Destroy.'' Configure the conditions to ''Any'' of
the following conditions:
''Actor receives event''''overlaps or collides'' with ''actor of
type''''Carrots''
''Attribute''''bullet.Position.Y''''>''''560''
Then drag and drop a Destroy behavioras per Figure 5-15.
 
Search WWH ::




Custom Search