Page 1 of 1

On "round end" and "round start"

Posted: May 10th, 2013, 4:30 am
by ekat
Hey guys..
I'm trying to create a small mod and i need to thread ad function on the start and end of every round.
I tryed "waittill("round_end") and waittill("round_start") but its not working.. :x
Any ideas? :P

Re: On "round end" and "round start"

Posted: May 10th, 2013, 11:35 am
by megazor
Try

Code: Select all

waittill("I have become smart enough to look into stock .gsc files");

Re: On "round end" and "round start"

Posted: May 10th, 2013, 2:37 pm
by Mooselflies
megazor wrote:Try

Code: Select all

waittill("I have become smart enough to look into stock .gsc files");
take your sarcasm somewhere else... this is the point of the forums for people to ask for help not have retards like you just abuse them.

Re: On "round end" and "round start"

Posted: May 10th, 2013, 8:06 pm
by Drofder2004
I am sure what Megazor meant to say was if you had a look in the game files you could find your answer.

The file you will be looking at is: _globallogic.gsc
That file is the key file that runs every gametype for CoD4.

There is a function inside that file called "endGame( winner, endReasonText)".
You are look for the first "notify", which is "level notify("game_ended");"

However, depending on what you are trying to do, will depend on what you will need to do (you may not want to thread your function at the beginning of the end_game, or you may not want to do whatever you are doing on a round-based gametype, like S&D.

Similarly there is a "startGame()" function, with "level notify("prematch_over")", as it suggests, this notify is called when the round is ready to begin after any prematch periods.

Megazor however has the right sentiments, try searching for it first, the raw files are full of answers.

Re: On "round end" and "round start"

Posted: May 10th, 2013, 8:09 pm
by Mooselflies
Drofder2004 wrote: Megazor however has the right sentiments, try searching for it first, the raw files are full of answers.
True but he could of went with a much better approach.

Re: On "round end" and "round start"

Posted: May 11th, 2013, 8:10 am
by megazor
I actually meant to help. Rather than waiting for a wizard to do all the job for you, better try to do something on you own.
I just gave right direction - open any round-based gametype and learn how it works.

Re: On "round end" and "round start"

Posted: May 11th, 2013, 2:29 pm
by ekat
Ok i solved my problsm, thank you all! :P
@ megazor: I just have not thought to look into the original files. Ofc its the easiest way! :P