Skip to content

WIP: Expand sfx event triggers

S Handley requested to merge shandley/expand-sfx-event-triggers into master

Currently, we only trigger one sound effect for the 'Run' event by an entity. The parameters such as file path, number of files and timout are currently hard coded for that item in a conditional statement.

In order to allow for adding additional sound effects in 0.5, this MR makes linking the event to a sound effect more general by:

  • Not storing the individual movement event (Run) as a state key with, instead using a HashMap to be able to store any event and the associated 'last_play' time.
  • Storing the parameters associated with the SFX in a .RON file format definition

The .ron format needs to be expanded to account for more parameters. I've been testing with a range of events, but in the interest of keeping this MR simple I've excluded those for a later MR.

The play state of the game is identical with this MR, it has no effect on the current run sfx played.

Edited by S Handley

Merge request reports