Lesson 2

Table of Contents

Applying Multiple Actions to a Single Event

Now that you’ve set up the gem recharge sounds, you need to get them to play at the right time. Visually, when the Wwizard fires the ice gem, you see a blast, followed by the staff swings off screen to the right, where the ice gem is magically placed into the staff. You could ask the game engine programmer to provide separate staff swing and magic recharge game calls and then create corresponding Events as you did with the original Fire_IceGem_Player Event used for the ice gem blast. Or, you could look to see if there’s a way to achieve what you need without programmer interaction, because this saves precious time for both you and the programmer. Since the ice gem blast, the woosh and the magical recharge are all part of the same visual animation, and that animation never changes, the timing between these visuals are predictable. You already have the Fire_IceGem_Player Event for the ice gem blast, so you simply need to trigger the woosh and magical recharge sounds to happen at a pre-determined time after that Event. This can be accomplished by delaying the Play actions.

  1. In the Event Viewer, select the Fire_IceGem_Player Event.

    In the Event Property Editor you can see the Play IceGem_Blast action you configured in the last lesson. There’s no practical limit to how many actions can be carried out for a single Event, so you’ll simply add the Gem_Recharge objects into the Event Property Editor's Actions pane. This time, however, instead of first creating a Play action and then adding the object to be played, you’ll simply drag the objects from the Project Explorer into the Actions pane. To do this you need to select both of the Gem_Recharge objects.

  2. Press and hold the Shift key and select the Gem_Recharge_Magic and Gem_Recharge_Woosh objects.

    [Note]

    If you don’t hold down the Shift key first, the moment you click on one of the Gem_Recharge objects, the Event Property Editor will change to the Property Editor and you won’t be able to complete the next steps.

  3. Drag either of the selected objects to the Actions pane in the Event Property Editor.

    The objects are now added to the Event Property Editor below the IceGem_Blast. While these actions are displayed as a list, it’s important to know that these actions are not carried out sequentially, one after the other, but instead happen simultaneously unless you make some additional changes.

  4. Play the Fire_IceGem_Player Event object.

    Notice that the blast, woosh and the magic chime sounds play at the same time. To get the sounds to match the animation sequence, you’ll need to delay each of them with specific values. Start by delaying the magic sound.

  5. In the Event Property Editor choose the Gem_Recharge_Magic.

    There are various properties associated with different types of actions, but it may be necessary to display those properties using the Event Property Editor's disclosure triangle.

  6. If necessary, go to the upper-right corner of the Event Property Editor, and click the disclosure triangle.

    Once the disclosure triangle is clicked, you see all of the properties related to the selected action appear in a pane on the right side. The Play action type includes a Delay property.

    In the game, the staff is magically recharged when it is moved off screen, about .7 seconds after the Wwizard fires the ice gem.

  7. Click the Delay parameter for Gem_Recharge_Magic, type 0.7 and press Enter.

    You need to do the same for the woosh sound, but with less delay. It would be helpful to see the Delay property of all of actions simultaneously in order to more easily understand the order in which they'll play. You can add property columns to the action list in the left pane of the Event Property Editor.

  8. Right-click any of the column headers and choose Configure Columns... .

    An Object Property Settings window appears.

  9. Expand the Events section, select Delay and click OK.

    You now see the Delay property displayed for all of the actions.

    [Note]

    If you don't see the Delay column in the left Actions pane, then drag the border between the two panes in the Event Property Editor to the right until the Delay column is visible.

    The woosh sound needs to be heard 0.5 second after the initial blast.

  10. Change the Gem_Recharge_Woosh delay value to 0.5 and press Enter.

    [Tip]

    Even with the Delay properties displayed as a column, they will not necessarily be displayed in chronological order. Click the Delay column header to sort into either ascending or descending order, and then click again to reverse the order.

    Now you can test the entire sequence of the ice gem blast with the woosh and magical recharge sounds.

  11. Play the Fire_IceGem_Player Event.


Was this page helpful?