Daily update
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
script_path = lfs.writedir() .. "Missions\\Scripts\\Buta\\DCS_TrainingMap_Caucasus\\"
|
||||||
|
|
||||||
|
if lfs then
|
||||||
|
dofile(script_path..'Mission_Init.lua')
|
||||||
|
|
||||||
|
env.info("Script Loader: LFS available, using relative script load path: " .. script_path)
|
||||||
|
else
|
||||||
|
env.info("Script Loader: LFS not available, using default script load path: " .. script_path)
|
||||||
|
end
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
local script_list =
|
||||||
|
{
|
||||||
|
-- Load order must be correct
|
||||||
|
-- "mist.lua", --mist_4_5_122
|
||||||
|
"spawnListener.lua",
|
||||||
|
}
|
||||||
|
|
||||||
|
local function load_scripts(path, list)
|
||||||
|
for index, value in ipairs(list) do
|
||||||
|
dofile(path .. value)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
load_scripts(script_path, script_list)
|
||||||
Binary file not shown.
@@ -0,0 +1,19 @@
|
|||||||
|
SpawnListener = {}
|
||||||
|
|
||||||
|
do
|
||||||
|
local ev = {}
|
||||||
|
|
||||||
|
function ev:onEvent(event)
|
||||||
|
trigger.action.outText('event: '..event.id,10)
|
||||||
|
|
||||||
|
if event.id == 15 then
|
||||||
|
local msg = 'initiator: '..event.initiator:getName()
|
||||||
|
trigger.action.outText(msg,10)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
world.addEventHandler(ev)
|
||||||
|
end
|
||||||
BIN
Binary file not shown.
Reference in New Issue
Block a user