Home   Help Search Login Register  

Author Topic: Detect if its raining  (Read 853 times)

0 Members and 1 Guest are viewing this topic.

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Detect if its raining
« on: 29 Jul 2004, 13:21:10 »
i need to know if its possible to detect if its raining in OFP for a script... i can't see anything to tell me it is, but i wondering if any of you guys would know...

if not, can anyone tell me how to tell how much time has passed in a mission?

cheers  :)
Proud Member of the Volunteer Commando Battalion

j-man

  • Guest
Re:Detect if its raining
« Reply #1 on: 29 Jul 2004, 13:46:42 »
I'm not sure if it's possible to detect if it's raining. But to detect how much time has passed, use the "time" command.

Nulear_Man

  • Guest
Re:Detect if its raining
« Reply #2 on: 29 Jul 2004, 14:05:33 »
You Use missionstart command (Returns array) To show the mission start time, _Time has do do with time but im not sure how

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Detect if its raining
« Reply #3 on: 29 Jul 2004, 14:34:26 »
_time is a local variable which represents the time elapsed since the script has started

time is a global variable representing the time elapsed since the start of the mission

daytime is the time in the game world
Plenty of reviewed ArmA missions for you to play

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Detect if its raining
« Reply #4 on: 30 Jul 2004, 01:34:18 »
cheers guys... hmmm thats a tad shite about the rain - is it possible to detect any weather condition? clouds for instance?
Proud Member of the Volunteer Commando Battalion

Dubieman

  • Guest
Re:Detect if its raining
« Reply #5 on: 30 Jul 2004, 02:41:00 »
Well I was lookin around and found a setovercast command. Dunno if that helps?

 :P

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Detect if its raining
« Reply #6 on: 30 Jul 2004, 20:56:40 »
Nope, you can't detect any weather (afaik)...

And use time cautiously as surprise surprise, it has a bug in it... ::)
(or it's another savegame bug..)
When ever a saved game (be it save or retry) is loaded the time is reset back to 0...

Quote
Well I was lookin around and found a setovercast command
This sets clouds (or what ever), does not detect them... ::)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Detect if its raining
« Reply #7 on: 30 Jul 2004, 21:48:20 »
its needed for scripting on an addon, so its no bother if the time is reset at all... oh well, shame you can't detect rain... begger  >:(
Proud Member of the Volunteer Commando Battalion

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Detect if its raining
« Reply #8 on: 01 Aug 2004, 01:20:26 »
Nope, you can't detect any weather (afaik)...

And use time cautiously as surprise surprise, it has a bug in it... ::)
(or it's another savegame bug..)
When ever a saved game (be it save or retry) is loaded the time is reset back to 0...This sets clouds (or what ever), does not detect them... ::)

Very, VERY interesting.... I didn't know that. The reason I find that interesting, is because that gives you a way of detecting when the mission has been loaded, which I never thought possible. Basically, you just need a script that a few seconds after the mission starts, and waits until Time is 0 before proceeding.

Hmm... not sure what you could do with such a script though, unless you wanted to rob the player of his one "savegame" he gets by default  :-X
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Detect if its raining
« Reply #9 on: 01 Aug 2004, 01:53:43 »
Yes, it's true.

The other thing about "time" is that it works off Martian seconds, which aren't always exactly the same as Earth seconds.  

Well ok maybe it isn't Mars, but it's somewhere.   The point is that an OFP game second does not necessarily exactly equal an Earth second.
Plenty of reviewed ArmA missions for you to play

Offline Maddmatt

  • Members
  • *
Re:Detect if its raining
« Reply #10 on: 01 Aug 2004, 12:17:52 »
Very, VERY interesting.... I didn't know that. The reason I find that interesting, is because that gives you a way of detecting when the mission has been loaded, which I never thought possible. Basically, you just need a script that a few seconds after the mission starts, and waits until Time is 0 before proceeding.

Hmm... not sure what you could do with such a script though, unless you wanted to rob the player of his one "savegame" he gets by default  :-X
Custom object/vehicle animations are also reset after a load, you could use this to restore custom animations. For example making sure a bas delta keeps his goggles down or a ukf marine keeps his helmet on.
http://bushfires.org/
African Conflict Mod
Mission editor and scripter

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Detect if its raining
« Reply #11 on: 01 Aug 2004, 13:57:10 »
setObjectTexture is reset after savegame reload as well, so this can be used in keeping the textures there where they should be...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Detect if its raining
« Reply #12 on: 01 Aug 2004, 16:09:48 »
Very, VERY interesting.... I didn't know that. The reason I find that interesting, is because that gives you a way of detecting when the mission has been loaded, which I never thought possible. Basically, you just need a script that a few seconds after the mission starts, and waits until Time is 0 before proceeding.

Hmm... not sure what you could do with such a script though, unless you wanted to rob the player of his one "savegame" he gets by default  :-X

The problem about this theory is that he cannot use "update retry position" saves, nor can he exit the game and continue later on. Been there, tried that, dropped mission. As usual then. :P

:beat: *Gets Shot* :beat:

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Detect if its raining
« Reply #13 on: 01 Aug 2004, 16:47:04 »
I have a way round the replaying saves issue armstrong.

It's a bit footery, but it works for me.

Look in this thread.

http://www.ofpec.com/yabbse/index.php?board=27;action=display;threadid=14265;start=135


Planck
I know a little about a lot, and a lot about a little.