OnPlayerSkydive: Difference between revisions

From Onset Developer Wiki
(Created page with "{{Info|Event|Client|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|OnPlayerSkydive()}} == Example == __EDIT_ME__ {{RelatedFunctions}} {{ClientEvents}}")
 
(Add function description, example and related functions.)
Line 1: Line 1:
{{Info|Event|Client|1.0}}
{{Info|Event|Client|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Called when the player starts to skydive.}}


{{FuncSyntax|OnPlayerSkydive()}}
{{FuncSyntax|OnPlayerSkydive()}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
 
function PlayerSkydive()
AddPlayerChat("Good luck.")
SetPostEffect("DepthOfField", "Distance", 0.05)
end
AddEvent("OnPlayerSkydive", PlayerSkydive)
</syntaxhighlight>
{{RelatedFunctions}}
{{RelatedFunctions}}
{{ClientEvents}}
* [[OnPlayerSkydiveCrash]]
* [[OnPlayerCancelSkydive]]

Revision as of 10:18, 10 December 2019

OnPlayerSkydive

Type: Event
Context: Client
Introduced: v1.0

Description

Called when the player starts to skydive.

Syntax

OnPlayerSkydive()

Example

function PlayerSkydive()
	AddPlayerChat("Good luck.")
	SetPostEffect("DepthOfField", "Distance", 0.05)
end
AddEvent("OnPlayerSkydive", PlayerSkydive)

See also