Wiki

Case Status
Log In

Wiki

 
Home ยป Samples»Heartbeat Tutorial»Heartbeat Tutorial Step 1
Index
Navigation
Community Wiki

Heartbeat Tutorial Step 1

Getting Started

Rename the Start State

Add a Play Sound Action

  • Open the Action Browser.
  • Open the Audio Category and select PlaySound.
  • Check Preview to preview the Play Sound editor.
  • Click Add Action to add the Play Sound action to the Heartbeat state.

Play a Sound

  • Set the Clip to a short Audio Clip (ideally heartbeat.wav from the sample project).
  • Press Play and the state should activate and play the audio clip once.

Add a "repeat" Event

  • Open the Event Manager.
  • Type "repeat" in the New Event edit field and hit enter.
  • The "repeat" event appears in the event table.

Add a Transition to the Heartbeat State

  • Right click on the Heartbeat state and select Add Transition.
  • Right click on the event box (...), and select the repeat event.
  • Drag an arrow out of the event box and back onto the state.

Add a Send Event Action to Trigger the Transition

  • Open the Action Browser.
  • Open the StateMachine Category and select SendEvent.
  • Click Add Action to add it to the state.
  • Click the Send Event pupup and select the repeat event.
  • Set the delay to 1 second.

Press Play and the heartbeat should repeat once a second.

While the game is running you can play with Volume and Delay to see the effect.

Step 2 - Using variables to control Volume and Delay.


Last modified on 12/13/2010 4:18 PM by User.

  • RSS Feed