Home   Help Search Login Register  

Author Topic: Real Time script  (Read 728 times)

0 Members and 1 Guest are viewing this topic.

G-36

  • Guest
Real Time script
« 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...

DBR_ONIX

  • Guest
Re:Real Time script
« Reply #1 on: 14 Jul 2004, 16:55:46 »
I don't really think it's possible..
Only way is maybe to ask the player to enter the propler time  :-\
- Ben

G-36

  • Guest
Re:Real Time script
« Reply #2 on: 14 Jul 2004, 19:41:27 »
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...

OrangeLeader

  • Guest
Re:Real Time script
« Reply #3 on: 14 Jul 2004, 19:43:18 »
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.

DBR_ONIX

  • Guest
Re:Real Time script
« Reply #4 on: 14 Jul 2004, 20:23:27 »
So, basicly, you can then? :P

Why do you need the real time, btw.. There might be an other way round it..
- Ben

Neptune

  • Guest
Re:Real Time script
« Reply #5 on: 15 Jul 2004, 13:24:26 »
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)

G-36

  • Guest
Re:Real Time script
« Reply #6 on: 15 Jul 2004, 16:23:44 »
Yes!
But Unfortunately I do not know how write scripts :-\....

DBR_ONIX

  • Guest
Re:Real Time script
« Reply #7 on: 16 Jul 2004, 14:05:05 »
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

OrangeLeader

  • Guest
Re:Real Time script
« Reply #8 on: 16 Jul 2004, 14:59:03 »
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.

DBR_ONIX

  • Guest
Re:Real Time script
« Reply #9 on: 16 Jul 2004, 16:58:25 »
Woooo ;D
missionStart is the command ;)

Quote
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
Code: [Select]
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)]
« Last Edit: 16 Jul 2004, 17:06:40 by DBR_ONIX »

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Real Time script
« Reply #10 on: 19 Jul 2004, 11:02:35 »
Good spotting ;)

However I have a feeling that it only works in MP missions (I could be wrong though?)...

DBR_ONIX

  • Guest
Re:Real Time script
« Reply #11 on: 19 Jul 2004, 18:23:24 »
:)
If it was multiplayer only, I guess it would have said.. It would be kinda weird it it didn't work in SP ???

- Ben