Final 2 questions I hope :-)

Have questions about CoD2 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

User avatar
<LT>YosemiteSam[NL]
Core Staff
Core Staff
Posts: 2155
Joined: December 7th, 2004, 2:07 am
Location: Netherlands
Contact:

Re: Final 2 questions I hope :-)

Post by <LT>YosemiteSam[NL] » July 19th, 2010, 1:58 pm

Drofder2004 wrote:Do forced cvars not stay on?

If I force a cheat dvar in CoD4 they stay on, but havent modded CoD2 in a long time.
That's easily checked I guess. I'll do that tonight.
btw, do I use setcvar("sv_cheats", "1");
or setcvar("devmap","mp_deck16"); ??

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Re: Final 2 questions I hope :-)

Post by waywaaaard » July 19th, 2010, 2:11 pm

I would avoid both. Really you won't have fun on that map. If you reeeeeeeeaaaaaaaaaaaaaally need to do that make it over a custom cvar.

Just compile your textures with nofalldamage and you are happy.
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
<LT>YosemiteSam[NL]
Core Staff
Core Staff
Posts: 2155
Joined: December 7th, 2004, 2:07 am
Location: Netherlands
Contact:

Re: Final 2 questions I hope :-)

Post by <LT>YosemiteSam[NL] » July 19th, 2010, 2:53 pm

waywaaaard wrote: Just compile your textures with nofalldamage and you are happy.
I thought you could check falldamage in the assetmanager (all the way at the bottom) but I don't see where it's located
(not at home so no asset manager at my disposal). Where is it located ?
Last edited by <LT>YosemiteSam[NL] on July 19th, 2010, 3:45 pm, edited 1 time in total.

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Re: Final 2 questions I hope :-)

Post by waywaaaard » July 19th, 2010, 3:04 pm

Image
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
<LT>YosemiteSam[NL]
Core Staff
Core Staff
Posts: 2155
Joined: December 7th, 2004, 2:07 am
Location: Netherlands
Contact:

Re: Final 2 questions I hope :-)

Post by <LT>YosemiteSam[NL] » July 19th, 2010, 3:44 pm

Thx m8, totaly missed that.....and I didn't even drink :?

User avatar
<LT>YosemiteSam[NL]
Core Staff
Core Staff
Posts: 2155
Joined: December 7th, 2004, 2:07 am
Location: Netherlands
Contact:

Re: Final 2 questions I hope :-)

Post by <LT>YosemiteSam[NL] » July 19th, 2010, 4:28 pm

:shock: :mrgreen:
Maybe that too

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

Re: Final 2 questions I hope :-)

Post by Drofder2004 » July 20th, 2010, 12:17 am

<LT>YosemiteSam[NL] wrote:
Drofder2004 wrote:Do forced cvars not stay on?

If I force a cheat dvar in CoD4 they stay on, but havent modded CoD2 in a long time.
That's easily checked I guess. I'll do that tonight.
btw, do I use setcvar("sv_cheats", "1");
or setcvar("devmap","mp_deck16"); ??
No, I meant "setCvar("jump_height", 100)", this should override the cheats.
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
<LT>YosemiteSam[NL]
Core Staff
Core Staff
Posts: 2155
Joined: December 7th, 2004, 2:07 am
Location: Netherlands
Contact:

Re: Final 2 questions I hope :-)

Post by <LT>YosemiteSam[NL] » July 20th, 2010, 9:33 am

aha ok.
Ah well I changed the height of the 2 boxes players are supposed to get on so I don't use the jump_height anymore.
Now I only have to change the textures and that sound not playing problem.

btw have you checked that already Rezil ?

I think the loadingscreen will be full of credits instead of showing a picture of the map :D

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

Re: Final 2 questions I hope :-)

Post by Drofder2004 » July 20th, 2010, 10:48 am

Firstly

Code: Select all

maps\mp\bounce_jump::main();
maps\mp\teleport::main();
maps\mp\poison::main();
maps\mp\elevators::main();
maps\mp\redeemer_rotate::main();
maps\mp\time::main();
maps\mp\timethree::main();
maps\mp\timeone::main();
maps\mp\ten::main();
maps\mp\nine::main();
maps\mp\eight::main();
maps\mp\seven::main();
maps\mp\six::main();
maps\mp\five::main();
maps\mp\four::main();
maps\mp\three::main();
maps\mp\two::main();
maps\mp\one::main();
maps\mp\dm::main();
maps\mp\strobe::main();
Is there any reason why none of these are not "thread ". that is a lot of things to process without threading.

Seoncdly, you dont even call the 5minutes main function anywhere in the code you provided?
Where is the "thread 5minutes::main()"?

And finally, for the sake of naming convention, do not use a number in the beginning of any filename or variable, so name it "fiveminutes.gsc" etc.
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
<LT>YosemiteSam[NL]
Core Staff
Core Staff
Posts: 2155
Joined: December 7th, 2004, 2:07 am
Location: Netherlands
Contact:

Re: Final 2 questions I hope :-)

Post by <LT>YosemiteSam[NL] » July 20th, 2010, 11:48 am

Drofder2004 wrote: Is there any reason why none of these are not "thread ". that is a lot of things to process without threading.
You mean like putting em all in 1 gsc and thread them .. right ? Donno, thaught it looked neater.

The fiveminutes gsc is this one

Code: Select all

maps\mp\time::main();
Didn't change the name to fiveminutes.
And finally, for the sake of naming convention, do not use a number in the beginning of any filename or variable, so name it "fiveminutes.gsc" etc.
You told me that before and I listened :) No where in my script does it say 5minutes/3minutes and stuff.

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Re: Final 2 questions I hope :-)

Post by waywaaaard » July 20th, 2010, 12:25 pm

If you are ready to test I am going to upload it on our cod2 jump server :D
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
<LT>YosemiteSam[NL]
Core Staff
Core Staff
Posts: 2155
Joined: December 7th, 2004, 2:07 am
Location: Netherlands
Contact:

Re: Final 2 questions I hope :-)

Post by <LT>YosemiteSam[NL] » July 20th, 2010, 12:57 pm

Ok, thx m8 :)

I found another small problem though;
I put the timelimt for the map inside my gsc (20 minutes). When I don't do that the sound of fiveminutes doesn't work ??!!
For me it's not realy a problem cause I always play 20 minute games on my server.

Btw: If I change the textures in the assetmanager do I have to put them on the brushes again in radiant ?
Or can I just put the changed iwi and gdt files in the iwd file ?

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Re: Final 2 questions I hope :-)

Post by waywaaaard » July 20th, 2010, 1:38 pm

just the changed iwis in the iwd
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

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

Re: Final 2 questions I hope :-)

Post by Drofder2004 » July 20th, 2010, 3:20 pm

[quote="<LT>YosemiteSam[NL]"][/quote]
For the threading I meant simply typing "thread " in front of the all.

not sure if you know about the "thread" function, but basically without threading the function, the function next waits until the first is complete.

So using yours atm:

Code: Select all

maps\mp\bounce_jump::main();
[wait for bounce_jump Main() to finish]

maps\mp\teleport::main();
[wait for teleport Main() to finish]

maps\mp\poison::main();
[wait for poison Main() to finish]

etc
When you do "thread maps\mp\bounce_jump::main()"
The function that follows (i.e teleport) will run without waiting.
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
<LT>YosemiteSam[NL]
Core Staff
Core Staff
Posts: 2155
Joined: December 7th, 2004, 2:07 am
Location: Netherlands
Contact:

Re: Final 2 questions I hope :-)

Post by <LT>YosemiteSam[NL] » July 20th, 2010, 3:28 pm

Aha ok. Didn't know that.

For that fiveminutes problem, I think the problem is in this script;

Code: Select all

main()
{
  thread time();
}

time()
{
   if (!isDefined(level.timelimit_custom))
   {
      level.timelimit_custom = getCvarFloat("scr_dm_timelimit");
      level.realtime_custom = getTime();
      
   }
      
      while (timeleft() > 301)
            wait 1;
       players = getentarray("player","classname");
   for(i=0;i<players.size;i++)
      players[i] playlocalsound("fiveminutes");

   
   wait 1;
   level.timelimit_custom = getCvarFloat("scr_dm_timelimit");
   //thread time();   //unlock this string if you want to let the script print it again if some admin changed (extended) timelimit after the printing
}

timeLeft()
{
   if (level.timelimit_custom != getCvarFloat("scr_dm_timelimit"))
   {
      level.timelimit_custom = getCvarFloat("scr_dm_timelimit");
      level.realtime_custom = getTime();
   }
   
   realtime = (getTime()-level.realtime_custom)/1000;

      timeleft = getCvarFloat("scr_dm_timelimit")*60 - realtime;
   if (timeleft < 301) timeleft = 1000;   //if timelimit is less than 5 minutes, do not let the script print anything to players
      return timeleft;
}

To recap;
- The sounds plays the first time the map is played but when I restart the map it doesn't play anymore, after I totaly shut down CoD2, restart the game and play the map it works again.

Shouldn't "return timeleft;" be "return time;" ?
Or should I unlock the "thread time();" string ?

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests