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..."
 
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 9: Line 9:


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua>
AddEvent("OnSoundFinished", function(sound)
AddPlayerChat("Sound ID " .. sound .. " has finished playing!")
end)
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
{{ClientEvents}}
{{SoundEvents}}

Latest revision as of 10:45, 7 July 2020

OnSoundFinished

Type: Event
Context: Client
Introduced: v1.0

Description

Called when a sound created by CreateSound or CreateSound3D stopped playing.

Syntax

OnSoundFinished(sound)

Parameters

  • sound
    The sound identifier.

Example

AddEvent("OnSoundFinished", function(sound)
	AddPlayerChat("Sound ID " .. sound .. " has finished playing!")
end)

See also