Sound Lua API: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 42: | Line 42: | ||
This file is auto generated, please don't edit manually! | This file is auto generated, please don't edit manually! | ||
'''Docs last hacked together on''': | '''Docs last hacked together on''': 13/10/2021 15:55 | ||
[[Category:Modding]][[Category:LuaAPI]] | [[Category:Modding]][[Category:LuaAPI]] |
Revision as of 08:51, 14 October 2021
Sound
Description
The sound API allows modders to trigger sound events in game
Functions
TriggerEvent
Sound.TriggerEvent(eventName, sourceName)
Expected parameter types
Name | Type |
---|---|
eventName | string |
sourceName | string |
Description: Triggers a sound even with name eventName
Returns: The event id, this can be used in other sound API functions (see StopAudio)
Notes: If _sourceName_ is not provided the sound will be played as a '2D' event
SetRTPC
Sound.SetRTPC(sourceName, RTPCName, value)
Expected parameter types
Name | Type |
---|---|
sourceName | string |
RTPCName | string |
value | number |
Description: Set Real-Time Parameter Curve for an audio event playign on this object
Returns: Nothing
Notes: You need to have started an audio event on this object before tryign to use SetRTPC, and that event must have RTPC control for something.
This file is auto generated, please don't edit manually!
Docs last hacked together on: 13/10/2021 15:55