Well, following Sky's tut I added random light and random skies to my map, light is working, but it seems all 3 different skies have no texture, since the skyobjects are all loaded, but the background is all black.
Here my lua part relevant for the random skies
Hidden/Spoiler:
[code]function ScriptPostLoad()
WeatherMode = math.random(1,3)
weather()
--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}
--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:Start()
EnableSPHeroRules()
if not ScriptCB_InMultiplayer() then
herosupport = AIHeroSupport:New{AIATTHeroHealth = 4000, AIDEFHeroHealth = 4000, gameMode = "NonConquest",}
herosupport:SetHeroClass(ALL, herostrAll)
herosupport:SetHeroClass(IMP, herostrEmp)
herosupport:AddSpawnCP("CP1","CP1Spawn")
herosupport:AddSpawnCP("CP2","CP2Spawn")
herosupport:AddSpawnCP("CP3","CP3Spawn")
herosupport:AddSpawnCP("CP4","CP4Spawn")
herosupport:AddSpawnCP("CP5","CP5Spawn")
herosupport:AddSpawnCP("CP6","CP6Spawn")
herosupport:Start()
else
end
end
function weather()
if WeatherMode == 1 then
ReadDataFile("dc:DBH\\sky.lvl", "night")
elseif WeatherMode == 2 then
ReadDataFile("dc:DBH\\sky.lvl", "evening")
elseif WeatherMode == 3 then
ReadDataFile("dc:DBH\\sky.lvl", "morning")
end
end[/code]
This is my evening.sky file located in worlds/sky folder