You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
- New `SoundContainer` function `Restart`, which allows you to restart a playing `SoundContainer`. Also another `Play` function, that lets you just specify the player to play the sound for.
151
151
152
-
- New `HDFirearm` INI property `PreFireSound`, which allows you to specify a sound that will play exactly once before the weapon fires. Note that this was designed primarily for things like flamethrowers, semi-auto weapons may wonky with it, and full-auto weapons may fire multiple shots in the first burst, if you don't also set an `ActivationDelay`.
152
+
- New `HDFirearm` INI property `PreFireSound`, which allows you to specify a sound that will play exactly once before the weapon fires.
153
+
Note that this was designed primarily for things like flamethrowers, semi-auto weapons may wonky with it, and full-auto weapons may fire multiple shots in the first burst, if you don't also set an `ActivationDelay`.
153
154
154
-
-`SoundSets` have been made a bit more fully featured, they can now have sub `SoundSets` and their own SoundSelectionCycleMode` and they now have a Lua binding so you can create them in Lua with `local mySoundSet = SoundSet()`. They have the following INI and Lua properties:
155
-
`SoundSelectionCycleMode` (INI and Lua R/W) - Determines how sounds in this `SoundSet` will be selected each time it is played (or when `SelectNextSounds` is called). Note that sub `SoundSets` can have different `SoundSelectionCycleModes`. `SoundSets` with sub `SoundSets` and sounds whose `SoundSelectionCycleMode` is `FORWARDS` will first go through their sounds, then each sub `SoundSet`.
155
+
-`SoundSets` have been made a bit more fully featured, they can now have sub `SoundSets` and their own `SoundSelectionCycleMode` and they now have a Lua binding so you can create them in Lua with `local mySoundSet = SoundSet()`.
156
+
They have the following INI and Lua properties:
156
157
157
-
`soundSet.SubSoundSets` (Lua R) - An iterator over the sub `SoundSets` of this `SoundSet`, allowing you to manipulate them as you would any `SoundSet`.
158
-
`soundSet:HasAnySounds(includeSubSoundSets)` (Lua) - Whether or not this `SoundSet` has any sounds, optionally including its sub `SoundSets`.
159
-
`soundSet:SelectNextSounds()` (Lua)` - Selects the next sounds for this `SoundSet`. Note that playing a `SoundContainer` will always also do this, so this is only really useful to allow you to skip sounds when `SoundSelectionCycleMode` is set to `FORWARDS`.
160
-
`soundSet:AddSound("Path/to/sound")` (Lua) - Adds the sound at the given path with no offset, 0 minimum audible distance, and default attenuation start distance.
161
-
`soundSet:AddSound("Path/to/sound", offset, minimumAudibleDistance, attenuationStartDistance)` (Lua) - Adds the sound at the given path with the given parameters.
162
-
`soundSet:AddSoundSet(soundSetToAdd)` (Lua) - Adds the given `SoundSet` as a sub `SoundSet` of this `SoundSet`.
158
+
`SoundSelectionCycleMode` (INI and Lua R/W) - Determines how sounds in this `SoundSet` will be selected each time it is played (or when `SelectNextSounds` is called).
159
+
Note that sub `SoundSets` can have different `SoundSelectionCycleModes`. `SoundSets` with sub `SoundSets` and sounds whose `SoundSelectionCycleMode` is `FORWARDS` will first go through their sounds, then each sub `SoundSet`.
160
+
161
+
`soundSet.SubSoundSets` (Lua R) - An iterator over the sub `SoundSets` of this `SoundSet`, allowing you to manipulate them as you would any `SoundSet`.
162
+
`soundSet:HasAnySounds(includeSubSoundSets)` (Lua) - Whether or not this `SoundSet` has any sounds, optionally including its sub `SoundSets`.
163
+
`soundSet:SelectNextSounds()` (Lua) - Selects the next sounds for this `SoundSet`. Note that playing a `SoundContainer` will always also do this, so this is only really useful to allow you to skip sounds when `SoundSelectionCycleMode` is set to `FORWARDS`.
164
+
`soundSet:AddSound("Path/to/sound")` (Lua) - Adds the sound at the given path with no offset, 0 minimum audible distance, and default attenuation start distance.
165
+
`soundSet:AddSound("Path/to/sound", offset, minimumAudibleDistance, attenuationStartDistance)` (Lua) - Adds the sound at the given path with the given parameters.
166
+
`soundSet:AddSoundSet(soundSetToAdd)` (Lua) - Adds the given `SoundSet` as a sub `SoundSet` of this `SoundSet`.
163
167
164
168
Additionally, `AddSound` and `AddSoundSet` INI properties work for `SoundSets`. They are exactly the same as they are for `SoundContainers`.
165
169
@@ -258,11 +262,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
258
262
259
263
-`Scenes` with a `PresetName` containing the strings "Test", "Editor" and "Tutorial" are no longer excluded from the scenarios screen and from the MetaGame.
260
264
261
-
-`SoundContainer` is now a concrete Lua entity. This means it can now be created with `CreateSoundContainer("PresetName", "DataModule.rte")` and has all the standard functionality like cloning, etc. To support these changes, a bunch of Lua functionality has been added and modified:
262
-
`soundContainer.Immobile` - Whether or not the `SoundContainer` is immobile. Immobile sounds are generally used for GUI elements and will never be automatically panned, pitched or attenuated.
263
-
`soundContainer.AttenuationStartDistance` - Formerly INI only, this property is now gettable and settable through Lua. See previous changelog entries for details on it.
264
-
`soundContainer.Pos` - Rather than updating the `SoundContainer's` position through `AudioMan`, you should now use the `Pos` property.
265
-
`soundContainer.Volume` - In addition to attenuation based volume changes, it is now possible to set a `SoundContainer's` overall volume. This works together with volume changes caused by attenuation.
265
+
-`SoundContainer` is now a concrete Lua entity. This means it can now be created with `CreateSoundContainer("PresetName", "DataModule.rte")` and has all the standard functionality like cloning, etc.
266
+
To support these changes, a bunch of Lua functionality has been added and modified:
267
+
268
+
`soundContainer.Immobile` - Whether or not the `SoundContainer` is immobile. Immobile sounds are generally used for GUI elements and will never be automatically panned, pitched or attenuated.
269
+
`soundContainer.AttenuationStartDistance` - Formerly INI only, this property is now gettable and settable through Lua. See previous changelog entries for details on it.
270
+
`soundContainer.Pos` - Rather than updating the `SoundContainer's` position through `AudioMan`, you should now use the `Pos` property.
271
+
`soundContainer.Volume` - In addition to attenuation based volume changes, it is now possible to set a `SoundContainer's` overall volume. This works together with volume changes caused by attenuation.
266
272
`soundContainer.Pitch` - Rather than updating the `SoundContainer's` pitch through `AudioMan`, you should now use the `Pitch` property. Also note that this now works properly with the game's global pitch so no complicated handling is necessary.
267
273
268
274
-`AddSound` and `SelectNextSoundSet` Lua bindings have been moved from `SoundContainer` to `SoundSet`. The latter has been renamed and the former have been trimmed down slightly since some complexity is no longer needed. Their speciifcs are mentioned in the `Added` section.
@@ -313,9 +319,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
313
319
314
320
- Removed `Activity` property `FundsOfTeam#`, use `Team#Funds` instead.
315
321
316
-
- Some functionality has been moved from `AudioMan` to `SoundContainer`. As such, the following `AudioMan` Lua bindings are no longer available:
The lengthy `PlaySound` function should be replaced by making a `SoundContainer` in your `Create` function and setting properties appropriately. This can be done by creating one defined INI with `soundContainer = CreateSoundContainer(...)`, or by making an empty one with `soundContainer = SoundContainer()`.
322
+
- Some functionality has been moved from `AudioMan` to `SoundContainer`. As such, the following `AudioMan` Lua bindings are no longer available:
The lengthy `PlaySound` function should be replaced by making a `SoundContainer` in your `Create` function and setting properties appropriately.
326
+
This can be done by creating one defined INI with `soundContainer = CreateSoundContainer(...)`, or by making an empty one with `soundContainer = SoundContainer()`.
0 commit comments