Перейти к контенту

zaza10

Пользователи
  • Число публикаций

    4
  • Регистрация

  • Последнее посещение

  • AMKoin

    0 [Подарить AMKoin]

Баланс оценок

0
  1. в зове припяти вставляю в bind_stalker.script такой код: if true then local hud = get_hud() local custom_static = hud:GetCustomStatic("cs_debug" ) if custom_static == nil then hud:AddCustomStatic("cs_debug", true) custom_static = hud:GetCustomStatic("cs_debug" ) end local lvid, gvid = db.actor:level_vertex_id(), db.actor:game_vertex_id() local pos, dir = db.actor: position(), db.actor:direction() local pos2 = level.vertex_position(lvid) local valid = pos2:distance_to(pos) <= 0.7 local msg = string.format("lvid: %d\\n", lvid) .. string.format("gvid: %d\\n", gvid) .. string.format("pos: %f,%f,%f\\n", pos.x, pos.y, pos.z) .. string.format("dir: %f,%f,%f\\n", dir.x, dir.y, dir.z) .. string.format("valid: %s", tostring(valid)) if custom_static = nil then custom_static:wnd():SetText(msg) end end при загрузке вылет: Expression : !m_error_code Function : raii_guard::~raii_guard File : D:\prog_repository\sources\trunk\xrServerEntities\script_storage.cpp Line : 748 Description : ...рипяти\gamedata\scripts\smart_terrain_control.script:65: attempt to index field 'actor' (a nil value) что делать?
  2. zaza10

    Скриптование

    в зове припяти вставляю в bind_stalker.script такой код: if true then local hud = get_hud() local custom_static = hud:GetCustomStatic("cs_debug" ) if custom_static == nil then hud:AddCustomStatic("cs_debug", true) custom_static = hud:GetCustomStatic("cs_debug" ) end local lvid, gvid = db.actor:level_vertex_id(), db.actor:game_vertex_id() local pos, dir = db.actor: position(), db.actor:direction() local pos2 = level.vertex_position(lvid) local valid = pos2:distance_to(pos) <= 0.7 local msg = string.format("lvid: %d\\n", lvid) .. string.format("gvid: %d\\n", gvid) .. string.format("pos: %f,%f,%f\\n", pos.x, pos.y, pos.z) .. string.format("dir: %f,%f,%f\\n", dir.x, dir.y, dir.z) .. string.format("valid: %s", tostring(valid)) if custom_static = nil then custom_static:wnd():SetText(msg) end end при загрузке вылет: Expression : !m_error_code Function : raii_guard::~raii_guard File : D:\prog_repository\sources\trunk\xrServerEntities\script_storage.cpp Line : 748 Description : ...рипяти\gamedata\scripts\smart_terrain_control.script:65: attempt to index field 'actor' (a nil value) что делать?
  3. здравствуйте, подскажите пожалуста, как снять в зове припяти координаты (координаты+вертексы)
×
×
  • Создать...