Noise Lua API: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
== Description == | == Description == | ||
The Noise system provides a method of producing sounds that the AI can be aware of and respond to. | The Noise system provides a method of producing sounds that the AI can be aware of and respond to. | ||
'''Noise Table Definition''' | |||
{| class="wikitable" | |||
|- | |||
! Field name !! Type !! Description | |||
|- | |||
| soundName || string || Name of the Wwise sound to be triggered | |||
|- | |||
| attraction || number || Attraction level from 0.0 to 1.0 | |||
|- | |||
| volume || number || Volume from 0.0 to 1.0 | |||
|- | |||
| trusted || bool || If trusted, an AI will not investigate this noise (thinking it to be an intruder, for example. | |||
|} | |||
== Functions == | == Functions == | ||
=== Emit === | === Emit === | ||
Line 40: | Line 54: | ||
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''': 11/10/2018 12:53 | ||
[[Category:Modding]][[Category:LuaAPI]] | [[Category:Modding]][[Category:LuaAPI]] |
Revision as of 12:49, 11 October 2018
Noise
Description
The Noise system provides a method of producing sounds that the AI can be aware of and respond to.
Noise Table Definition
Field name | Type | Description |
---|---|---|
soundName | string | Name of the Wwise sound to be triggered |
attraction | number | Attraction level from 0.0 to 1.0 |
volume | number | Volume from 0.0 to 1.0 |
trusted | bool | If trusted, an AI will not investigate this noise (thinking it to be an intruder, for example. |
Functions
Emit
Noise.Emit(deviceName, noiseTable)
Expected parameter types
Name | Type |
---|---|
deviceName | string |
noiseTable | Lua Table |
Description: Emits a noise from deviceName with attributes in noiseTable
Returns: Nothing
Notes: Attraction value is required, volume is optional (default 1.0), as is duration (defaults to 0, which loops the sound).
Silence
Noise.Silence(deviceName, noiseTable)
Expected parameter types
Name | Type |
---|---|
deviceName | string |
noiseTable | Lua Table |
Description: Silences the noise
Returns: Nothing
Notes: Silences the noise, principally from an AI perspective. Will attempt to stop the audio if this noise was set up with an end event.
This file is auto generated, please don't edit manually!
Docs last hacked together on: 11/10/2018 12:53