Хемуль36рус 1 790 Опубликовано 5 Февраля 2013 Может кто подскажет, почему происходит вылет, на первых страницах есть квест на части мутантов от dana вроде все сделал правильно, но при выдаче награды вылет . FATAL ERROR [error]Expression : fatal error [error]Function : CScriptEngine::lua_error [error]File : E:\stalker\patch_1_0004\xr_3da\xrGame\script_engine.cpp [error]Line : 73 [error]Description : <no expression> [error]Arguments : LUA error: f:\stalker amk\gamedata\scripts\flamethrower.script:409: 'for' limit must be a number stack trace: в чем причина, все сделано как написано, а вылет происходит.( Intrel Core i5 9400F, msi gtx 1660 super ventus, RAM 16g-DDR4, HD 2000g, Win 10x64, SSD 256g, SSD m2 500g. Поделиться этим сообщением Ссылка на сообщение
Хемуль36рус 1 790 Опубликовано 20 Октября 2013 Господа, вопрос такой, возможно уже и кто то спрашивал, но я тогда спрошу еще раз, сделал квесты, все они после выполнения пропадают из пда, а вот один никак не хочет, выполняется без проблем, все отдается и забирается, квест выполнен, но в пда остался, это в принципе не напрягает, но все так в чем проблема может быть, я все уже раз 20 проверил, все вроде написано как и всегда. Intrel Core i5 9400F, msi gtx 1660 super ventus, RAM 16g-DDR4, HD 2000g, Win 10x64, SSD 256g, SSD m2 500g. Поделиться этим сообщением Ссылка на сообщение
Хемуль36рус 1 790 Опубликовано 6 Января 2014 Господа. с квестами всё понятно, но вот у меня народ жалуется, если квест провален, он не пишется в проваленные, а действительно, что нужно что бы он в проваленные записался, я что-то про это нигде не видел. Intrel Core i5 9400F, msi gtx 1660 super ventus, RAM 16g-DDR4, HD 2000g, Win 10x64, SSD 256g, SSD m2 500g. Поделиться этим сообщением Ссылка на сообщение
Хемуль36рус 1 790 Опубликовано 13 Июля 2014 (изменено) @Vadyanchikus, извини за вопрос конечно. А ты вообще понимаешь то , что делаешь. Обычно по диалогам вылет, если тег не такой или пропущен. Но что бы движковый, лично у меня ни разу не было. Может быть без лога, если в тегах <text></text> писать сразу текст, без ссылки на текстовый файл. Изменено 13 Июля 2014 пользователем Хемуль36рус Intrel Core i5 9400F, msi gtx 1660 super ventus, RAM 16g-DDR4, HD 2000g, Win 10x64, SSD 256g, SSD m2 500g. Поделиться этим сообщением Ссылка на сообщение
Хемуль36рус 1 790 Опубликовано 15 Июля 2014 @Staffenberg, Чтобы было новое задание нужно в диалоге выдать <task>pogovor_banda</task> например. Но для начала, я бы тебе посоветовал почитать всё о том как делаются квесты. Если ты спрашивает о такой мелочи, то ты особо не понимаешь что делаешь. Без обид, я так же начинал и до сих пор еще многого не выучил. Intrel Core i5 9400F, msi gtx 1660 super ventus, RAM 16g-DDR4, HD 2000g, Win 10x64, SSD 256g, SSD m2 500g. Поделиться этим сообщением Ссылка на сообщение
Хемуль36рус 1 790 Опубликовано 6 Декабря 2015 @bios, Есть удобные и проверенные функции для квестов от Сяка. local items_count=0 local itemin=nil function have_item_namber(itm,need_namber) local actor=db.actor items_count=0 itemin=itm actor:iterate_inventory(cheking_item,actor) if items_count>=need_namber then return true else return false end end function cheking_item(actor,item) local items=item:section() if items==itemin then items_count=items_count+1 end end function create_items(npc,section,number) for i=1,number do alife():create(section, npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id()) end end local reloc_params={} local stalk function out_item_namber(itm_section,need_number) reloc_params.itm_section=itm_section reloc_params.itm_cnt=need_number reloc_params.itm_cnt_found=0 db.actor:iterate_inventory(checkout_items_count,db.actor) reloc_params.itm_cnt_found=0 if reloc_params.itm_cnt_found<=reloc_params.itm_cnt then db.actor:iterate_inventory(out_items_count,db.actor) end news_manager.relocate_item(db.actor, "out", itm_section) reloc_params={} end function relocate_item_namber(stalker,itm_section,need_number) stalk=stalker reloc_params.itm_section=itm_section reloc_params.itm_cnt=need_number reloc_params.itm_cnt_found=0 db.actor:iterate_inventory(checkout_items_count,db.actor) reloc_params.itm_cnt_found=0 if reloc_params.itm_cnt_found<=reloc_params.itm_cnt then db.actor:iterate_inventory(reloc_items_count,db.actor) end news_manager.relocate_item(db.actor, "out", itm_section) reloc_params={} end function checkout_items_count(actor,item) if item.section and item:section()==reloc_params.itm_section then reloc_params.itm_cnt_found = reloc_params.itm_cnt_found + 1 end end function reloc_items_count(actor,item) if item.section and item:section()==reloc_params.itm_section and reloc_params.itm_cnt_found<reloc_params.itm_cnt then db.actor:transfer_item(item, stalk) reloc_params.itm_cnt_found = reloc_params.itm_cnt_found + 1 end end function out_items_count(actor,item) if item.section and item:section()==reloc_params.itm_section and reloc_params.itm_cnt_found<reloc_params.itm_cnt then amk.remove_item_from_inventory(item, actor) reloc_params.itm_cnt_found = reloc_params.itm_cnt_found + 1 end end Пример использования. function escape_sid_doki_have() return sak.have_item_namber("sid_document",1) ~= false end function give_escape_sid_doki(first_speaker, second_speaker) sak.out_item_namber("sid_document", 1) end function complete_escape_sid_doki_quest(first_speaker, second_speaker) dialogs.relocate_money(second_speaker, 5000, "in") dialogs.relocate_item_section(second_speaker, "wpn_toz34_vip", "in") end 2 Intrel Core i5 9400F, msi gtx 1660 super ventus, RAM 16g-DDR4, HD 2000g, Win 10x64, SSD 256g, SSD m2 500g. Поделиться этим сообщением Ссылка на сообщение
Хемуль36рус 1 790 Опубликовано 20 Марта 2016 , http://stalkerin.gameru.net/wiki/index.php?title=SoC._%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5_%D0%BA%D0%B2%D0%B5%D1%81%D1%82%D0%BE%D0%B2 1 Intrel Core i5 9400F, msi gtx 1660 super ventus, RAM 16g-DDR4, HD 2000g, Win 10x64, SSD 256g, SSD m2 500g. Поделиться этим сообщением Ссылка на сообщение
Хемуль36рус 1 790 Опубликовано 23 Июня 2018 Есть вот такая схема, когда НПС идет за ГГ куда бы он не пошел. ---------------------------------------------- -- Karavan simple -- Схема каравана простая - гг ведет чудиков -- 2008 - 2009 Rulix aka Bak ---------------------------------------------- class "evaluator_end" (property_evaluator) function evaluator_end:__init(name,storage) super (nil,name) self.st = storage end function evaluator_end:evaluate() return not xr_logic.is_active(self.object,self.st) end class "evaluator_karavan" (property_evaluator) function evaluator_karavan:__init(name,storage) super (nil, name) self.st = storage end function evaluator_karavan:evaluate() return db.actor and xr_logic.is_active(self.object,self.st) and self.st.enabled == true end class "action_karavan" (action_base) function action_karavan:__init(name,storage) super (nil, name) self.st = storage end function action_karavan:initialize() action_base.initialize(self) local npc = self.object npc:set_desired_position() npc:set_desired_direction() npc:set_detail_path_type(move.curve) npc:set_path_type(game_object.level_path) self.offset = vector():set(math.random()*6-3,0,math.random()*6-3) self.offset:normalize() end function action_karavan:execute() action_base.execute(self) local npc = self.object if xr_logic.try_switch_to_another_section(npc,self.st,db.actor) then return end local dist = db.actor:position():distance_to(npc:position()) local state,look,anim = state_mgr.get_state(npc) if dist <= self.st.radius then state,look,anim = self.st.close_state,nil,true elseif dist < self.st.close_dist then state,look,anim = self.st.close_state,nil,true elseif dist >= self.st.faraway_dist then state,look,anim = self.st.wait_state,nil,true elseif dist < self.st.near_dist then state,look,anim = self.st.near_state,nil,true elseif not (state and state_lib.states[state].movement == move.stand) then state,look,anim = self.st.faraway_state,nil,true end if self.st.look == true and state_lib.states[state].movement == move.stand then look = true end if look == true then look = {look_object = db.actor} end if anim == true then anim = {animation = true} end if state then state_mgr.set_state(npc,state,nil,nil,look,anim) end if state_lib.states[state].movement ~= move.stand then local vertex_id = level.vertex_in_direction(db.actor:level_vertex_id(),self.offset,self.st.radius) utils.send_to_nearest_accessible_vertex(npc,vertex_id) end end function action_karavan:finalize() self.object:clear_animations() end prop_karavan = 9651 prop_end = prop_karavan+1 act_karavan = prop_karavan function add_to_binder(object,char_ini,scheme,section,st) local manager = object:motivation_action_manager() manager:add_evaluator(prop_karavan,evaluator_karavan("evaluator_karavan",st)) local action = action_karavan("action_karavan",st) action:add_precondition(world_property(stalker_ids.property_alive,true)) action:add_precondition(world_property(stalker_ids.property_enemy,false)) action:add_precondition(world_property(stalker_ids.property_danger,false)) xr_motivator.addCommonPrecondition(action) if watcher_act then action:add_precondition(world_property(watcher_act.evid_near_stuff,false)) action:add_precondition(world_property(watcher_act.evid_see_body,false)) action:add_precondition(world_property(watcher_act.evid_see_stuff,false)) end action:add_precondition(world_property(prop_karavan,true)) action:add_effect(world_property(prop_karavan,false)) manager:add_action(act_karavan,action) local atbl = {xr_actions_id.alife} for i,id in ipairs(atbl) do action = manager:action(id) if action then action:add_precondition(world_property(prop_karavan,false)) end end end function set_scheme(npc,ini,scheme,section,gulag_name) local st = xr_logic.assign_storage_and_bind(npc,ini,scheme,section) st.logic = xr_logic.cfg_get_switch_conditions(ini,section,npc) st.close_dist = utils.cfg_get_number(ini,section,"close_dist",npc,false) or 7 st.near_dist = utils.cfg_get_number(ini,section,"near_dist",npc,false) or 14 st.faraway_dist = utils.cfg_get_number(ini,section,"faraway_dist",npc,false) or 32 st.close_state = utils.cfg_get_string(ini,section,"close_state",npc,false,"") or "guard" st.near_state = utils.cfg_get_string(ini,section,"near_state",npc,false,"") or "rush" st.faraway_state = utils.cfg_get_string(ini,section,"faraway_state",npc,false,"") or "sprint" st.wait_state = utils.cfg_get_string(ini,section,"wait_state",npc,false,"") or "hide" st.look = utils.cfg_get_bool(ini,section,"look_on_actor",npc,false) st.radius = utils.cfg_get_number(ini,section,"radius",npc,false) or 4 st.no_loot = utils.cfg_get_bool(ini,section,"no_loot",npc,false) if st.no_loot ~= true then st.no_loot = nil end st.enabled = true end function disable_scheme(npc,scheme) rx_ai.printf("disable") local st = db.storage[npc:id()][scheme] if st then st.enabled = false end end 1 Intrel Core i5 9400F, msi gtx 1660 super ventus, RAM 16g-DDR4, HD 2000g, Win 10x64, SSD 256g, SSD m2 500g. Поделиться этим сообщением Ссылка на сообщение
Хемуль36рус 1 790 Опубликовано 23 Июня 2018 В логике Скрытый текст [karavan] close_dist = 2 near_dist = 10 faraway_dist = 31 close_state = guard near_state = rush faraway_state = sprint wait_state = rush look_on_actor = false radius = 1 combat_ignore_cond = always combat_type = monolith no_loot = true on_info = {+поршень} walker3@lexa переход в схему Скрытый текст [walker2@lexa] path_walk = jupiter_lexa_walk path_look = jupiter_lexa_look meet = meet danger = danger_condition combat_ignore_cond = always on_info = {+поршень} karavan 1 Intrel Core i5 9400F, msi gtx 1660 super ventus, RAM 16g-DDR4, HD 2000g, Win 10x64, SSD 256g, SSD m2 500g. Поделиться этим сообщением Ссылка на сообщение