Engine
core.engine.set_fps_limit
SharedSets 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 —
0removes the limit and is the default on both sides.
Parameters
| Type | Name | Description |
|---|---|---|
int | limit | Maximum frames per second to apply |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
core.engine.set_fps_limit(60)core.engine.set_fps_limit(0)