Skip to content

Current questions and answers regarding the map editor.

User Avatar
#1086
Auto-translated
Oligarch

local SET_LIGHT_GROUND = { 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su' }
if mod(GetDate(DAY), 3) == 0 then
local lightIndex = mod(round(GetDate(DAY)/3),7)+1
SetAmbientLight( GROUND, SET_LIGHT_GROUND[lightIndex], nil, 0 )
end

doesn't work either. It says, value was nil when getting global with name "round"
attempt to call a nil value
The map uses its own files ;)
'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'
Copy these files to the root of the map and check at least "Tuesday" ;) (and there will be no xdb#xpointer(/AmbientLight) there). You can also easily take the lighting you want from the resources and put it in the map.
"round" is rounding, it probably won't be needed, so don't use it (or better, use 3.1 ;) )
Моды для HeroesV:
NHF 0.90 : NHF - группа в VK

Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...