Vehicle Body

self:is_sleeping

Shared

Checks whether the vehicle body is currently sleeping

Syntax

local result = self:is_sleeping()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
boolresulttrue if the condition is met, false otherwise

Examples

Check if a vehicle body is sleeping
local entity = physics.vehicle.create()

core.engine.print("info", "Vehicle body sleeping:", entity:is_sleeping())

On this page