Is sleeping
origins-powerful-powers:is_sleepingentity condition
True while the entity is asleep: a player lying in a bed, or a villager sleeping at night.
No fields.
- It turns true the moment sleep starts. To run something once at that moment, use the
action_on_sleep_startpower. - Sleeping is synced to clients, so this also works in client-checked places like
hud_render.
Example: a sleeper's regeneration.
{
"type": "origins:action_over_time",
"interval": 40,
"condition": {
"type": "origins-powerful-powers:is_sleeping"
},
"entity_action": {
"type": "origins:heal",
"amount": 1
}
}While you sleep, you heal half a heart every 2 seconds.
No attribute.