OnPlayerFootstep: Difference between revisions

From Onset Developer Wiki
(Created page with "{{Info|Event|Client|1.2.2}} {{FuncDescription|Called when a player hits the ground with their feet when walking/running. You can return '''false''' to suppress the footstep...")
 
(No difference)

Latest revision as of 20:11, 1 September 2020

OnPlayerFootstep

Type: Event
Context: Client
Introduced: v1.2.2

Description

Called when a player hits the ground with their feet when walking/running.

You can return false to suppress the footstep sound.

Syntax

OnPlayerFootstep(player, floor_type)
  • player
    The player identifier.
  • floor_type
    The floor under their feet. Can be one of FloorTypes.

Example

AddEvent("OnPlayerFootstep", function(player, floor_type)
    if player == GetPlayerId() then
        AddPlayerChat("OnPlayerFootstep")
    end
end)

See also