OnPlayerFootstep

From Onset Developer Wiki
Revision as of 20:11, 1 September 2020 by BlueMountains (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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