OnSoundFinished: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Event|Client|1.0}} {{FuncDescription|Called when a sound created by CreateSound or CreateSound3D stopped playing.}} {{FuncSyntax|OnSoundFinished(sound)}} {{F..." |
Added related functions & an example, as well as a note that it's currently non-functional. |
||
Line 1: | Line 1: | ||
{{Info|Event|Client|1.0}} | {{Info|Event|Client|1.0}} | ||
{{FuncDescription|Called when a sound created by [[CreateSound]] or [[CreateSound3D]] stopped playing.}} | {{FuncDescription|Called when a sound created by [[CreateSound]] or [[CreateSound3D]] stopped playing. | ||
As per 1.0.2, this event is not working properly and is being investigated.}} | |||
{{FuncSyntax|OnSoundFinished(sound)}} | {{FuncSyntax|OnSoundFinished(sound)}} | ||
Line 9: | Line 11: | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua> | |||
AddEvent("OnSoundFinished", function(sound) | |||
AddPlayerChat("Sound ID " .. sound .. " has finished playing!") | |||
end) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{ | {{SoundEvents}} | ||
{{SoundFunctions}} |
Revision as of 22:36, 15 January 2020
Description
Called when a sound created by CreateSound or CreateSound3D stopped playing.
As per 1.0.2, this event is not working properly and is being investigated.
Syntax
OnSoundFinished(sound)
Parameters
- sound
The sound identifier.
Example
AddEvent("OnSoundFinished", function(sound)
AddPlayerChat("Sound ID " .. sound .. " has finished playing!")
end)