Engine

core.engine.set_fps_limit

Shared

Sets the maximum frames per second

Syntax

local status = core.engine.set_fps_limit(
    limit
)

Behaviour depends on where it is called.

  • Server — sets the FPS limit for every connected client. It applies instantly to all connected clients when changed at runtime, and to any client that joins later.
  • Client — sets the local FPS limit, which can never exceed the server's limit. The lower of the two always applies.
  • No limit — 0 removes the limit and is the default on both sides.

Parameters

TypeNameDescription
intlimitMaximum frames per second to apply

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Limits the FPS to 60
core.engine.set_fps_limit(60)
Removes the FPS limit
core.engine.set_fps_limit(0)

On this page