Game Development Reference
In-Depth Information
Figure 8-19. Sounds tab
Click on the + sign to import a new audio file. Select the file named brick.mp3 to
import it. Then you need to select if you want to import the file as music or
sound as per Figure 8-20.
Figure 8-20. Music or Sound import
Select ''Import as Sound.''
Next, create a rule within the Ball actor to play the sound every time there is a
collision with a wall. Open the Ball actor in the Actor Editor. Create a new rule
and the condition will be ''Actor receives event'' ''overlaps or collides'' with
''actor of type'' ''Wall.'' As per Figure 8-21, drag and drop a Play Sound behavior
into the rule and change the settings to Sound: ''brick'' and Volume: ''0.50'' with
''Run to completion'' checked.
 
Search WWH ::




Custom Search