Difference between revisions of "Noise Lua API"

From Off Grid Wiki
Jump to navigation Jump to search
m
Line 40: Line 40:
 
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''': 10/11/2017 11:07
+
'''Docs last hacked together on''': 06/09/2018 14:53
 
[[Category:Modding]][[Category:LuaAPI]]
 
[[Category:Modding]][[Category:LuaAPI]]

Revision as of 14:16, 6 September 2018

Noise

Description

The Noise system provides a method of producing sounds that the AI can be aware of and respond to.

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: 06/09/2018 14:53