Home   Help Search Login Register  

Author Topic: Weather  (Read 1708 times)

0 Members and 1 Guest are viewing this topic.

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Weather
« on: 21 Jul 2003, 19:53:05 »
I know how to set the weather, and time of day, in the editor and with scripts, the question is:
Can it be set up where the "admin/host" can select the weather/fog/time of day at the assign screen, similar to the way the score and time of mission can be set?  Seems to me this must be in the description.ext somehow

max_killer_payne

  • Guest
Re:Weather
« Reply #1 on: 23 Jul 2003, 10:32:56 »
Here:

timeforit2change setovercast 0.5

e.g 100 setovercast 0.9, the higher that value the stormier it will be.

time setFog fogedensity, the higher the fog value the more fog will appear.

time setRain rainDensity, the higher the rainDensity the more rain.

Plz note the value 4 the density can only from 0-1 and things like 0.2,etc

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:Weather
« Reply #2 on: 23 Jul 2003, 12:08:07 »
Sure, I know that, and I usually do it with radio triggers, and I have seen it done radomly with scripts.   What I want to try is for the host/admin to be able to select it before the game begins.  I use this for the timer and score in the description.ext:
titleParam1 = "Time:";
valuesParam1[] = {10000, 1, 300, 600, 900, 1200, 1500, 1800, 2700, 3600, 7200};
defValueParam1 = 1800;
textsParam1[] = {"Unlimited","1 Min", "5 min", "10 min", "15 min", "20 min", "25 min", "30 min", "45 min", "1 hour", "2 hours"};

titleParam2 = "Score to win:";
valuesParam2[] = {10000, 1, 5, 7, 10, 15, 20, 25, 30};
defValueParam2 = 5;
textsParam2[] = {"Unlimited", 1, 5, 7, 10, 15, 20, 25, 30};

Can I do something similar for weather/fog/tod?
  I don't really want it to be variable, but fixed once the host sets it.  

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Weather
« Reply #3 on: 23 Jul 2003, 17:04:22 »
The following way is how i do my pregame selections.
The system below is what i have used in the EFL league C&H template
All that basically happens is that the init.sqs looks for the values for param1 and 2, and then skips to whatever label i need it too.
Within the scope of this label i then run any scripts etc that are required for that specific option

I dont actually do it from the init.sqs, i use a script called £Option.sqs", but using the init.sqs will better server your purposes




_______________________________________________________________________________
DESCRIPTION.EXT entry


titleParam1 = "DAYTIME";
valuesParam1[] = {1,2,3,4,5,6,7,8,9};
defValueParam1 = 1;
textsParam1[] = {"EFL Match ","Dawn", "Midday", "Dusk & Autoflares", "Dusk", "Night & Autoflares", "Night", "24hrs & Autoflare", "24hrs"};

titleParam2 = "GAMEPLAY";
valuesParam2[] = {1,2,3,4,5,6};
defValueParam2 = 1;
textsParam2[] = {"1 FLAG MATCH","1 Flag Public","3 FLAG MATCH","3 Flag Public","5 FLAG PROG>MATCH","5 Flag Prog>Public"};


___________________________________________________________________________
Init.sqs Entry


?(param1 == 1):goto "MATCH_A"
?(param1 == 2):goto "Dawn"
?(param1 == 3):goto "Midday"
?(param1 == 4):goto "Dusk"
?(param1 == 5):goto "Dusknoflare"
?(param1 == 6):goto "Night"
?(param1 == 7):goto "Nightnoflare"
?(param1 == 8):goto "DAYNIGHTDAY"
?(param1 == 9):goto "DAYNIGHTDAYnoflare"
goto "gametype"

#MATCH_A
;;point to whatever light setting you want as default for match setting
goto "Midday"
goto "gametype"

#Dawn
skiptime sunrise
timeofdaymessage = "                Sunrise"
;;;;;;;;;; ______Remove dead variables from memory ______ ;;;;;;;;;;
midnight = nil
midday = nil
sunset = nil
duskdelay = nil
refiredelay = nil
flare1type = nil
flare2type = nil
flare3type=nil
flare4type=nil
flare5type=nil
Lightcheck = nil
goto "gametype"

#Midday
skiptime midday
timeofdaymessage = "               Daytime"
;;;;;;;;;; ______Remove dead variables from memory ______ ;;;;;;;;;;
midnight = nil
sunrise = nil
sunset = nil
duskdelay = nil
refiredelay = nil
flare1type = nil
flare2type = nil
flare3type=nil
flare4type=nil
flare5type=nil
Lightcheck = nil
goto "gametype"

#Dusk
skiptime sunset
timeofdaymessage = "   Sunset, Autoflare ON"
;;;;;;;;;; ______Remove dead variables from memory ______ ;;;;;;;;;;
midnight = nil
midday = nil
goto "gametype"

#Dusknoflare
skiptime sunset
timeofdaymessage = "  Sunset, Autoflares OFF"
;;;;;;;;;; ______Remove dead variables from memory ______ ;;;;;;;;;;
midnight = nil
midday = nil
sunrise = nil
duskdelay = nil
refiredelay = nil
flare1type = nil
flare2type = nil
flare3type=nil
flare4type=nil
flare5type=nil
Lightcheck = nil
goto "gametype"

#Night
skiptime midnight
timeofdaymessage = "  Night, Autoflares ON"
;;;;;;;;;; ______Remove dead variables from memory ______ ;;;;;;;;;;
midday = nil
goto "gametype"

#Nightnoflare
skiptime midnight
timeofdaymessage = "  Night, Autoflares OFF"
;;;;;;;;;; ______Remove dead variables from memory ______ ;;;;;;;;;;
midday = nil
sunrise = nil
sunset = nil
duskdelay = nil
refiredelay = nil
flare1type = nil
flare2type = nil
flare3type=nil
flare4type=nil
flare5type=nil
Lightcheck = nil
goto "gametype"

#DAYNIGHTDAY
skiptime 10.0
timeofdaymessage = "  24 hrs, Autoflares ON"
?(local server):[] exec "acceltime\UpdateSkipTimeServer.sqs";[] exec "acceltime\UpdateClockServer.sqs"
?!(local Server):[] exec "acceltime\UpdateClock.sqs"
;;;;;;;;;; ______Remove dead variables from memory ______ ;;;;;;;;;;
duskdelay = nil
goto "gametype"

#DAYNIGHTDAYnoflare
skiptime 10.0
timeofdaymessage = "  24 hrs, Autoflares OFF"
?(local server):[] exec "acceltime\UpdateSkipTimeServer.sqs";[] exec "acceltime\UpdateClockServer.sqs"
?!(local Server):[] exec "acceltime\UpdateClock.sqs"
;;;;;;;;;; ______Remove dead variables from memory ______ ;;;;;;;;;;
duskdelay = nil
refiredelay = nil
flare1type = nil
flare2type = nil
flare3type=nil
flare4type=nil
flare5type=nil
Lightcheck = nil
goto "gametype"

#gametype
?(param2 == 1):goto "ONEFLAGMATCH"
?(param2 == 2):goto "ONEFLAGPUBLIC"
?(param2 == 3):goto "THREEFLAGMATCH"
?(param2 == 4):goto "THREEFLAGPUBLIC"
?(param2 == 5):goto "FIVEFLAGMATCH"
?(param2 == 6):goto "FIVEFLAGPUBLIC"
goto "END"


#ONEFLAGMATCH
oneflag = true
gametypemessage = "       1 Flag C&H Match"
recommendedteams = format["        %1 V %1 minimum",flag1teamsize]
Parachutes = format["               %1", ParachuteText]
targeting = "               Disabled"
vr = "               Disabled"
vehrespawn = false
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare3.sqs"
[] exec "cnh\Flag3ch.sqs"
;;;;;;;;;; ______Remove dead variables from memory ______ ;;;;;;;;;;
flag3teamsize = nil
flag5teamsize = nil
goto "END"

#ONEFLAGPUBLIC
oneflag = true
gametypemessage = "       1 Flag C&H Public"
recommendedteams = format["        %1 V %1 minimum",flag1teamsize]
Parachutes = format["               %1", ParachuteText]
targeting = "               Enabled"
vr = "               Enabled"
vehrespawn = true
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare3.sqs"
[] exec "cnh\Flag3ch.sqs"
;;;;;;;;;; ______Remove dead variables from memory ______ ;;;;;;;;;;
flag3teamsize = nil
flag5teamsize = nil
goto "END"

#THREEFLAGMATCH
threeflag = true
gametypemessage = "       3 Flag C&H Public"
recommendedteams = format["        %1 V %1 minimum",flag3teamsize]
Parachutes = format["               %1", ParachuteText]
targeting = "              Disabled"
vr = "              Disabled"
vehrespawn = false
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare1.sqs"
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare3.sqs"
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare5.sqs"
[] exec "cnh\Flag1ch.sqs"
[] exec "cnh\Flag3ch.sqs"
[] exec "cnh\Flag5ch.sqs"
;;;;;;;;;; ______Remove dead variables from memory ______ ;;;;;;;;;;
flag1teamsize = nil
flag5teamsize = nil
goto "END"

#THREEFLAGPUBLIC
threeflag = true
gametypemessage = "       3 Flag C&H Public"
recommendedteams = format["        %1 V %1 minimum",flag3teamsize]
Parachutes = format["               %1", ParachuteText]
targeting = "               Enabled"
vr = "               Enabled"
vehrespawn = true
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare1.sqs"
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare3.sqs"
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare5.sqs"
[] exec "cnh\Flag1ch.sqs"
[] exec "cnh\Flag3ch.sqs"
[] exec "cnh\Flag5ch.sqs"
;;;;;;;;;; ______Remove dead variables from memory ______ ;;;;;;;;;;
flag1teamsize = nil
flag5teamsize = nil
goto "END"

#FIVEFLAGMATCH
fiveflag = true
gametypemessage = "5 Flag Progressive C&H Match"
recommendedteams = format["        %1 V %1 minimum",flag5teamsize]
Parachutes = format["               %1", ParachuteText]
targeting = "               Disabled"
vr = "                Limited"
vehrespawn = false
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare1.sqs"
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare2.sqs"
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare3.sqs"
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare4.sqs"
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare5.sqs"
[] exec "progressive\Flag1prog.sqs"
[] exec "progressive\Flag2prog.sqs"
[] exec "progressive\Flag3prog.sqs"
[] exec "progressive\Flag4prog.sqs"
[] exec "progressive\Flag5prog.sqs"
enableradio false
[player] join grpnull
;;;;;;;;;; ______Remove dead variables from memory ______ ;;;;;;;;;;
flag1teamsize = nil
flag3teamsize = nil
goto "END"

#FIVEFLAGPUBLIC
fiveflag = true
gametypemessage = "5 Flag Progressive C&H Public"
recommendedteams = format["        %1 V %1 minimum",flag5teamsize]
Parachutes = format["               %1", ParachuteText]
targeting = "               Enabled"
vr = "               Enabled"
vehrespawn = false
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare1.sqs"
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare2.sqs"
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare3.sqs"
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare4.sqs"
?(Param1 ==4)or(Param1 == 6)or(Param1 == 8):[]exec "autoflares\arcflare5.sqs"
[] exec "progressive\Flag1prog.sqs"
[] exec "progressive\Flag2prog.sqs"
[] exec "progressive\Flag3prog.sqs"
[] exec "progressive\Flag4prog.sqs"
[] exec "progressive\Flag5prog.sqs"
enableradio false
[player] join grpnull
;;;;;;;;;; ______Remove dead variables from memory ______ ;;;;;;;;;;
flag1teamsize = nil
flag3teamsize = nil
goto "END"

#END
Param1 = gamelength
estimatedtimeleft param1


exit





MOST IMPORTANT

Param1 is normally the length of the game in seconds

So at the end of the init.sqs, reset param1 with the line

Param1 = 1800

for a 30 minute game

that is of course if your end of game trigger is run by time passed.

Additionally Param2 is the score limit, so if your end of game trigger looks for a score to be reached, then you need to reset its value
« Last Edit: 23 Jul 2003, 17:16:31 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:Weather
« Reply #4 on: 23 Jul 2003, 17:20:03 »
Thanks, I'll give this a shot later today.  The same concept should work for weather and fog too right?

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Weather
« Reply #5 on: 24 Jul 2003, 17:50:37 »
yes just put your time weather setting in the correct label that the param1==XX: goto "Foggy"

#Foggy
1 setfog 1
goto "end"

#End
Param1 = 1800
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:Weather
« Reply #6 on: 24 Jul 2003, 19:00:43 »
I have cut and pasted your entries above on to an description.ext and init.sqs file and I get the following error when I try to load the mission in the editor:

'users\myname\missions\missionname\description.ext':';' encountered instead of '='

I am not sure what this means, but OFP will close when happens, I can't find where it is talking about