Home   Help Search Login Register  

Author Topic: Timer Script  (Read 2222 times)

0 Members and 1 Guest are viewing this topic.

Guyver NOD

  • Guest
Timer Script
« on: 30 Nov 2003, 13:45:47 »
I want my Multiplayer game to end after a period of time and count down, eg. 20 minutes remaining,  10,  5,   2,   End.

I have only been able to find one tutorial on how to do this, but that did not work. I just got error messages and the game did not end.

Can some one please tell me where I can get a working tutorial or give me an example mission that all ready has this. So I can see how to do it my self?

gundernak

  • Guest
Re:Timer Script
« Reply #1 on: 30 Nov 2003, 18:53:38 »
A very dumb and simple solution I have:

set up 4 triggers.

make sure all of these trigger will activate at the start of the mission.

In the first trigger you can set the delay 20 min,
in second 10 min delay
third 15 min delay
fourth 18 min delay,

You can display every of these triggers activation with the text option the trigger includes in the editor, or by the use of hint command, you can find the syntax of 'hint' at command references...

gundernak

  • Guest
Re:Timer Script
« Reply #2 on: 30 Nov 2003, 19:02:05 »
or put this into a script and activate at the start of the mission:



Hint "20 mins remaining"
~1200
Hint "10 mins remaining"
~300
Hint "5 mins remaining"
~180
Hint "2 mins remaining"

exit

Guyver NOD

  • Guest
Re:Timer Script
« Reply #3 on: 01 Dec 2003, 12:33:30 »
Sorry, maybe I did not make my self clear. I have not been doing this for long and I am useing tutorials to get things done. I do not know how to do things myself. I mean I do not know how to set the trigger to delay.

Also for the script, what do I call it, and how do I get the triggers to use it?

Sorry if this is a pain, but I am trying!
« Last Edit: 01 Dec 2003, 12:34:04 by Guyver NOD »

slowworm

  • Guest
Re:Timer Script
« Reply #4 on: 01 Dec 2003, 14:57:28 »
Dont take this personally but:

Read the fucking manual!

This is very basic. Using the tutorials, you should be able to find out yourself how to set triggers and choose a delay time!

One hint I can give you: Did you set your Mission editor to advanced mode? You need to do this to have all options available. And in the condition line just fill in "true" instead of "this", that means the triggers are activated at the start.


edit: Make sure you got Mr-Murrays OPF Editing Manual. You will find it on OFPEC.
You will find some additional tutorials that might help you here:
http://www.geocities.com/opfmapping/Tutorials.htm


cu slowworm
« Last Edit: 01 Dec 2003, 15:07:04 by slowworm »

Guyver NOD

  • Guest
Re:Timer Script
« Reply #5 on: 01 Dec 2003, 17:14:18 »
I have been reading manauls to find out how to do things. I have now found out how to activate sqs files.

But I still can't find any that tell me how to delay a trigger. So can some one please tell me the name of a manual and where I can get it from, that explains how to do this please?

gundernak

  • Guest
Re:Timer Script
« Reply #6 on: 01 Dec 2003, 19:29:25 »
jmaster33's basic trigger tutorial from editor depot - tutorials - getting started

'Countdown : This means the amount of time it will take for the trigger to activate, after the conditions have been met.

Timeout : This means that the conditions must be true for the amount of time specified for the trigger to activate.'

when you created a trigger in the editor, off course you can double-click it, and you can see options, there will be these two options above as well...

slowworm was too hard, I think, in my opinion there is no need for this style of communication, but surely he was right a little bit... ;)

Keep on searching and informing about the basic things(tutorials - getting started)...print it and read...a lot of new possibilities you can find at the beginning...





Guyver NOD

  • Guest
Re:Timer Script
« Reply #7 on: 01 Dec 2003, 23:24:05 »
Thank you, I have been looking for the wroung thing.

I've been looking for some thing that said delay, not timeout or countdown.

PheliCan

  • Guest
Re:Timer Script
« Reply #8 on: 03 Dec 2003, 23:12:59 »
Even if this is an easy task, who are you to judge him!? You where all n00b's in the beginning!!!

Well... I said it was easy and then I better tell an easy way how to do it. ;) In the same folder as where you created the mission, create a file called "init.sqs" and copy the following code.

Code: [Select]
Hint "20 mins remaining"
~600
Hint "10 mins remaining"
~300
Hint "5 mins remaining"
~180
Hint "2 mins remaining"
~120
forceEnd
exit

Save, exit and your mission should be terminated after 20 minutes (with warnings every 20, 10, 5 and 2 minuter remaining).

[Q.E.D]

(Please close this topic once your query is solved)
« Last Edit: 03 Dec 2003, 23:17:48 by PheliCan »

gundernak

  • Guest
Re:Timer Script
« Reply #9 on: 04 Dec 2003, 01:00:10 »
hi PheliCan...

I just hope you wrote the 'you' in singular in your first sentence, and do not forget that you have also made a judgement by your lines... ;)

And with good will...I do not think these code is good to be put in init.sqs, because there are so many things and settings which are bothered with this...

The code must be put in a script file of course (something.sqs), and must be started at the beginning of the mission by putting the exec command into a trigger on activation field, or in some init field of a unit...

slowworm

  • Guest
Re:Timer Script
« Reply #10 on: 05 Dec 2003, 17:17:16 »
I have to apologize. That was far too rude.
I just thought you were too lazy to look up it in the tutorials. Did't imagine you could have searched them for the wrong keyword. That was prejudice.
Sry PheliCan and to all for my rude speech!
And not long ago I had to call myself newbee, better should remember this.


cu slowworm