Lesson 3

Table of Contents

Modifying Object Properties With Game Parameters

Now you need to import the audio file you intend to use for a heartbeat.

  1. Click the Audio tab and drag the Heartbeat audio file from the Audio files for Lesson 3 folder into the Actor-Mixer Hierarchy’s Default Work Unit.

    A new Sound SFX object called Heartbeat is created.

    This audio file plays a heartbeat that only lasts a little more than a second. You’re ultimately going to trigger the heartbeat to play with a single Event that will occur only one time when the player first starts a new level. It would be bad if your player's heart stopped prematurely, so you’ll need to loop the file to play indefinitely. This is a behavior that can be turned on in the Sound Property Editor.

  2. With the Heartbeat Sound SFX object selected, click the Loop check box.

    While the heartbeat will technically play the entire time the player is in the game, it could become really annoying to hear it beat constantly. Remember, the point of the heartbeat is to let the player know that their health is waning, so we only want to hear it when the health drops below a certain level. In essence, you want to have the value of the PlayerHealth Game Parameter affect the volume of the Heartbeat Sound SFX object. Define this in the RTPC tab in the Sound Property Editor.

  3. In the Sound Property Editor, click the RTPC tab.

    The RTPC tab of the Property Editor is displayed.

    [Note]

    If necessary, drag the lower part of the Sound Property Editor down so that you can see more of the empty Graph View in the display.

    The main work of defining the relationship between a Game Parameter and the properties they affect is performed in a graph view in the Property Editor. Currently there’s no information in the graph view since you haven’t yet indicated what properties of the object you would like to modify based on a Game Parameter’s input.

  4. Click the [>>] selector and choose Voice Volume.

    [Note]

    On screens that are unable to display the entire list of options, you may need to click a down arrow displayed at the bottom in order to scroll to the Voice Volume option.

  5. Use the [>>] selector in the X Axis column and choose Game Parameters > PlayerHealth.

    You now see a graph where the X-axis shows player health and the Y-axis indicates the Heartbeat’s voice volume. The diagonal red line is referred to as an RTPC curve, which indicates what volume the heartbeat will play at based on the player’s health. The bottom of the Voice Volume column represents -200 dB, which is inaudible, so this may cause you to think that the player’s health is at zero, and the heartbeat won’t be heard. In fact, it’s just the opposite, because the PlayerHealth Game Sync uses a scale where 100 represents full health and 0 represents that the player is defeated.


Was this page helpful?