OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: G-36 on 14 Jul 2004, 14:16:12
-
I have an idea!
do a script that do the time and the date in the mission like the time in the computer.
i need a script like that...
-
I don't really think it's possible..
Only way is maybe to ask the player to enter the propler time :-\
- Ben
-
lol ;D
why it's not possible :o
you get the time on the computer to a variable and then to put the real time on the mission...
-
Well when you save in a mission and quit, the real time and date are recorded. When you go back to load that mission again it say resume and the date and time. I don't know how to extract the data, but if you saved right when the game started then you could use that to set ythe time and date. The only problem is if you saved during the game the time settings would be saved also. You would have to start the mission over to go back to real time settings.
-
So, basicly, you can then? :P
Why do you need the real time, btw.. There might be an other way round it..
- Ben
-
So, basicly, you can then? :P
Why do you need the real time, btw.. There might be an other way round it..
- Ben
I think it's a good Idea!
That way you can play missions in multyplayer using the server-time setting. Which could feel very realistic", in a way. 8)
-
Yes!
But Unfortunately I do not know how write scripts :-\....
-
So, bascily, I don't think thre is any (Easy) way to get the time, unless you get the player to enter it :(
Hmmm.... Hold on...
How does the game know it's the 25 of December, and then give the all the players santa hats (;D)...?
- Ben
-
OFP knows the current time when the game is running. It time stamps when you save a mission. Someone out there has to know the command to call it up. This script would be easy if you knew that one command.
-
Woooo ;D
missionStart is the command ;)
missionStart
Compatibility:
Version 1.8 required.
Type of returned value:
Array
Description:
Return time when mission start in format [year, month, day, hour, minute, second].
So, to set the hour, you set the editor time to 00:00 or something
Then use
timeofstart = missionStart select 2
skiptime timeofstart
;D
- Ben
PS, not tested, but should be fine :)
[Edit : Changed the variable hour to timeofstart, as hour might have been used in the game.. Just to be on the safe side)]
-
Good spotting ;)
However I have a feeling that it only works in MP missions (I could be wrong though?)...
-
:)
If it was multiplayer only, I guess it would have said.. It would be kinda weird it it didn't work in SP ???
- Ben