diff --git a/doc/en/scripting/ecs.md b/doc/en/scripting/ecs.md index 7835d21da..7b1f87a1a 100644 --- a/doc/en/scripting/ecs.md +++ b/doc/en/scripting/ecs.md @@ -32,7 +32,9 @@ entity:require_component(name: str) -> component -- Enables/disables the component entity:set_enabled(name: str, enable: bool) --- Returns id of player the entity is bound +-- Returns id of player the entity is bound, otherwise -1 is returned. +-- At components initialization -1 is also returned, +-- since the binding occurs after initialization. entity:get_player() -> int or nil ``` diff --git a/doc/ru/scripting/ecs.md b/doc/ru/scripting/ecs.md index fd20523a6..4f9d45f08 100644 --- a/doc/ru/scripting/ecs.md +++ b/doc/ru/scripting/ecs.md @@ -32,7 +32,9 @@ entity:require_component(name: str) -> компонент -- Включает/выключает компонент по имени entity:set_enabled(name: str, enable: bool) --- Возвращает id игрока, к которому привязана сущность +-- Возвращает id игрока, к которому привязана сущность, в ином же случае возвращает -1. +-- Во время инициализации компонентов при спавне сущности так же возвращает -1, +-- так как привязка происходит после инициализации. entity:get_player() -> int или nil ```