Skip to content

Create an impact for sounds #7

@tacotexmex

Description

@tacotexmex

To increase immersion a sound impact will feature four sound types:

  • raise,
  • still,
  • fall,
  • end

The syntax can be as following:

sound = {
	on_raise = { sound = "raise.ogg", gain = 0.5, length = "1.4", loop = false },
	on_still = { sound = "sound.ogg", gain = 0.5, length = "1.4", loop = true  },
	on_fall = { sound = "sound.ogg", gain = 0.5, length = "1.4", loop = false  },
	on_end = { sound = "sound.ogg", gain = 0.5, length = "1.4", loop = false  },
	to_target = false,
},

I think it's pretty self-explanatory.

  • The length var is needed for proper looping of the sound if loop = true.
  • to_target = true will play the sound to the target (player) only, while when false it plays it on target position to everyone.
  • I use the on_ prefix for vars because I don't think I can call end end 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions