Login

russian armor

Worldbuilder Tip of the Week #18 & #19

15 Sep 2014, 19:33 PM
#2
avatar of IronMedic

Posts: 318

Hi i've got this "extended" blizzard code with some explaining comments in the code.
Code

-------------------------------------------------------------------------
-------------------------------------------------------------------------

import("ScarUtil.scar")
import("Systems/BlizzardMulitplayer.scar")

-------------------------------------------------------------------------
-- [[ ONINIT ]]
-------------------------------------------------------------------------

function OnInit()

local blizzarddata =
{
--time in second until first blizzard
blizzard_interval_first = 900,
--Minimum time between blizzards after first
blizzard_interval_min = 900,
--Maximum time between blizzards after first
blizzard_interval_max = 1000,
--Minimum max duration of blizzard
blizzard_exit_min = 120,
--Maximum duration of blizzard
blizzard_exit_max = 200,
}

MP_BlizzardInit(
-- Blizzard atmosphere
"data:art/scenarios/presets/atmosphere/_mp_2p_kholodnaya_ferma_blizzard.aps",
--Default atmosphere
"data:art/scenarios/presets/atmosphere/_mp_2p_Kholodnaya_Ferma.aps",
-- Start in Blizzard, true or nil
nil,
-- Blizzard Data shoud be nil if not using blizzarddata
blizzarddata,
-- Use Speech, true or nil
true,
--Blizzard out transition atmosphere set to a atmosphere preset or nil
"data:art/scenarios/presets/atmosphere/_mp_2p_kholodnaya_ferma_transition_out.aps"
)
scar_addInit (OnInit)
end

0 user is browsing this thread: