Модератор форума: Slon |
Форум РЕДАКТОР - ArmA 2 Вопрос-Ответ Изменение погоды |
Изменение погоды |
› Понедельник
› 20.04.2020
› 18:27
› Сообщение #
Я смотрел в config.bin островов. Там как-то вставлена погода которая по умолчанию на острове. Может есть не сложный пример как это там сделано?
|
› Понедельник
› 20.04.2020
› 18:34
› Сообщение #
я в островах не разбераюсь
|
› Понедельник
› 20.04.2020
› 18:56
› Сообщение #
В общем я вот так сделал случайную погоду и время суток. Может кому-то понадобится:
Код // === Случайная погода ===================== setFog_array = [0,0,0,0,0,0,0,0,0,0,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.4,0.4,0.4,0.4,0.4,0.4,0.5,0.5,0.5,0.5,0.5,0.6,0.6,0.6,0.6,0.7,0.7,0.7,0.8,0.8,0.9,1]; setFog_rezultat = selectRandom setFog_array; setOvercast_array = [0,0,0,0,0,0,0,0,0,0,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.4,0.4,0.4,0.4,0.4,0.4,0.5,0.5,0.5,0.5,0.5,0.6,0.6,0.6,0.6,0.7,0.7,0.7,0.8,0.8,0.9,1]; setOvercast_rezultat = selectRandom setOvercast_array; setRain_array = [0,0,0,0,0,0,0,0,0,0,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.4,0.4,0.4,0.4,0.4,0.4,0.5,0.5,0.5,0.5,0.5,0.6,0.6,0.6,0.6,0.7,0.7,0.7,0.8,0.8,0.9,1]; setRain_rezultat = selectRandom setRain_array; setGusts_array = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1]; setGusts_rezultat = selectRandom setGusts_array; setWindDir_array = [20,40,60,80,100,120,140,160,180,200,210,220,240,260,280,300]; setWindDir_rezultat = selectRandom setWindDir_array; setWindForce_array = [20,40,60,80,100,120,140,160,180,200,210,220,240,260,280,300]; setWindForce_rezultat = selectRandom setWindForce_array; setWindStr_array = [20,40,60,80,100,120,140,160,180,200,210,220,240,260,280,300]; setWindStr_rezultat = selectRandom setWindStr_array; setWind_array = [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10]; setWind_rezultat_x = selectRandom setWind_array; setWind_rezultat_y = selectRandom setWind_array; skipTime -24; 0 setFog setFog_rezultat; 0 setOvercast setOvercast_rezultat; 0 setRain setRain_rezultat; 0 setGusts setGusts_rezultat; 0 setLightnings 1; 0 setRainbow 1; setWind [setWind_rezultat_x, setWind_rezultat_y, true]; // setWindDir_rezultat setWindDir 180; // setWindForce_rezultat setWindForce 1; // setWindStr_rezultat setWindStr 1; skipTime 24; // --- Указать дату и время ---------------------------------------------------- Time_array = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]; Time_rezultat = selectRandom Time_array; setDate [2020, 6, 5, Time_rezultat, 0]; // --- Вывод даты и времени суток на экран --------------------------- hint str daytime; // А можно вывести сразу дату и время: hint str date; Добавлено (20.04.2020, 18:57) Добавлено (20.04.2020, 18:58) Добавлено (14.05.2020, 12:45) Код skipTime -24; 0 setFog [0.2,0,0]; 0 setOvercast 1; 0 setRain 1; 0 setGusts 1; 0 setLightnings 1; 0 setRainbow 1; setWind [10, 10, true]; 10 setWindForce 1; 10 setWindStr 1; skipTime 24; |
| |||
Чат сайта |