-- 基础信息 local base_info = { group_id = 111101230 } -- DEFS_MISCS local Controllers = { 230001, 230003 } local EnvControlGadgets = { 230001, 230003, 230004 } --================================================================ -- -- 配置 -- --================================================================ -- 怪物 monsters = { } -- NPC npcs = { } -- 装置 gadgets = { { config_id = 230001, gadget_id = 70360303, pos = { x = 2514.494, y = 342.186, z = -1730.811 }, rot = { x = 0.000, y = 0.000, z = 3.304 }, level = 1 }, { config_id = 230003, gadget_id = 70360302, pos = { x = 2534.360, y = 349.312, z = -1741.111 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }, { config_id = 230004, gadget_id = 70360301, pos = { x = 2531.510, y = 372.652, z = -1728.693 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 } } -- 区域 regions = { } -- 触发器 triggers = { { config_id = 1230002, name = "GROUP_LOAD_230002", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_EVENT_GROUP_LOAD_230002" } } -- 变量 variables = { } --================================================================ -- -- 初始化配置 -- --================================================================ -- 初始化时创建 init_config = { suite = 1, end_suite = 0, rand_suite = false } --================================================================ -- -- 小组配置 -- --================================================================ suites = { { -- suite_id = 1, -- description = , monsters = { }, gadgets = { 230001, 230003, 230004 }, regions = { }, triggers = { "GROUP_LOAD_230002" }, rand_weight = 100 } } --================================================================ -- -- 触发器 -- --================================================================ -- 触发操作 function action_EVENT_GROUP_LOAD_230002(context, evt) --lua层调用,将指定gadget转到一个合适的昼夜激活状态 local is_daynight_gadget = false for i = 1 ,#EnvControlGadgets do if (230001 == EnvControlGadgets[i]) then is_daynight_gadget = true end end if (not is_daynight_gadget) then ScriptLib.PrintContextLog(context,"EnvState: 错误的传入了一个不在昼夜列表中的物件!!!") return -1 end local current_env_state_id = ScriptLib.GetCurrentLevelTagVec(context, 1)[1] local current_env_state = ScriptLib.GetLevelTagNameById(context,current_env_state_id) if (current_env_state == "2_4_Day") then ScriptLib.SetGroupGadgetStateByConfigId(context, 0,230001,202) end if (current_env_state == "2_4_Night") then ScriptLib.SetGroupGadgetStateByConfigId(context, 0,230001,302) end --lua层调用,将指定gadget转到一个合适的昼夜激活状态 local is_daynight_gadget = false for i = 1 ,#EnvControlGadgets do if (230003 == EnvControlGadgets[i]) then is_daynight_gadget = true end end if (not is_daynight_gadget) then ScriptLib.PrintContextLog(context,"EnvState: 错误的传入了一个不在昼夜列表中的物件!!!") return -1 end local current_env_state_id = ScriptLib.GetCurrentLevelTagVec(context, 1)[1] local current_env_state = ScriptLib.GetLevelTagNameById(context,current_env_state_id) if (current_env_state == "2_4_Day") then ScriptLib.SetGroupGadgetStateByConfigId(context, 0,230003,202) end if (current_env_state == "2_4_Night") then ScriptLib.SetGroupGadgetStateByConfigId(context, 0,230003,302) end return 0 end require "V2_4/EnvStateControl" require "V2_4/EnvState"