On "round end" and "round start"

Have a question about modding, modelling or skinning? Have a tutorial to post? Post here!

Moderator: Core Staff

Post Reply
ekat
CJ Newbie
CJ Newbie
Posts: 53
Joined: September 15th, 2010, 4:56 pm

On "round end" and "round start"

Post by ekat » May 10th, 2013, 4:30 am

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

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

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

Post by megazor » May 10th, 2013, 11:35 am

Try

Code: Select all

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

User avatar
Mooselflies
CJ Spammer!
CJ Spammer!
Posts: 641
Joined: April 20th, 2009, 8:29 pm
PSN ID: mooselflies
Location: Reading :<

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

Post by Mooselflies » May 10th, 2013, 2:37 pm

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.

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

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

Post by Drofder2004 » May 10th, 2013, 8:06 pm

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.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

User avatar
Mooselflies
CJ Spammer!
CJ Spammer!
Posts: 641
Joined: April 20th, 2009, 8:29 pm
PSN ID: mooselflies
Location: Reading :<

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

Post by Mooselflies » May 10th, 2013, 8:09 pm

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.

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

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

Post by megazor » May 11th, 2013, 8:10 am

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.
Last edited by megazor on May 11th, 2013, 3:02 pm, edited 2 times in total.

ekat
CJ Newbie
CJ Newbie
Posts: 53
Joined: September 15th, 2010, 4:56 pm

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

Post by ekat » May 11th, 2013, 2:29 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests