Sound Lua API: Difference between revisions
Jump to navigation
Jump to search
m (Rich moved page Lua Apis/Sound Lua API to Sound Lua API without leaving a redirect: removing sub-pages) |
No edit summary |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<!-- This file is auto generated, please don't edit manually! --> | |||
= Sound = | = Sound = | ||
== Description == | == Description == | ||
Line 7: | Line 8: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| eventName || string | | eventName || string | ||
Line 17: | Line 20: | ||
'''Notes''': If _sourceName_ is not provided the sound will be played as a '2D' event | '''Notes''': If _sourceName_ is not provided the sound will be played as a '2D' event | ||
=== | === SetRTPC === | ||
<syntaxhighlight source lang="lua">Sound. | <syntaxhighlight source lang="lua">Sound.SetRTPC(sourceName, RTPCName, value)</syntaxhighlight> | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| | ! Name !! Type | ||
|- | |||
| sourceName || string | |||
|- | |||
| RTPCName || string | |||
|- | |||
| value || number | |||
|} | |} | ||
'''Description''': | '''Description''': Set Real-Time Parameter Curve for an audio event playign on this object | ||
'''Returns''': Nothing | '''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''': | '''Docs last hacked together on''': 29/08/2023 16:24 | ||
[[Category:Modding]][[Category:LuaAPI]] |
Latest revision as of 14:24, 29 August 2023
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: 29/08/2023 16:24