OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Messiah 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 :)
-
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.
-
You Use missionstart command (Returns array) To show the mission start time, _Time has do do with time but im not sure how
-
_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
-
cheers guys... hmmm thats a tad shite about the rain - is it possible to detect any weather condition? clouds for instance?
-
Well I was lookin around and found a setovercast command. Dunno if that helps?
:P
-
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...
Well I was lookin around and found a setovercast command
This sets clouds (or what ever), does not detect them... ::)
-
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 >:(
-
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
-
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.
-
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.
-
setObjectTexture is reset after savegame reload as well, so this can be used in keeping the textures there where they should be...
-
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:
-
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