Page 2 of 5

Re: Final 2 questions I hope :-)

Posted: July 19th, 2010, 1:58 pm
by <LT>YosemiteSam[NL]
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"); ??

Re: Final 2 questions I hope :-)

Posted: July 19th, 2010, 2:11 pm
by waywaaaard
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.

Re: Final 2 questions I hope :-)

Posted: July 19th, 2010, 2:53 pm
by <LT>YosemiteSam[NL]
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 ?

Re: Final 2 questions I hope :-)

Posted: July 19th, 2010, 3:04 pm
by waywaaaard
Image

Re: Final 2 questions I hope :-)

Posted: July 19th, 2010, 3:44 pm
by <LT>YosemiteSam[NL]
Thx m8, totaly missed that.....and I didn't even drink :?

Re: Final 2 questions I hope :-)

Posted: July 19th, 2010, 4:28 pm
by <LT>YosemiteSam[NL]
:shock: :mrgreen:
Maybe that too

Re: Final 2 questions I hope :-)

Posted: July 20th, 2010, 12:17 am
by Drofder2004
<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.

Re: Final 2 questions I hope :-)

Posted: July 20th, 2010, 9:33 am
by <LT>YosemiteSam[NL]
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

Re: Final 2 questions I hope :-)

Posted: July 20th, 2010, 10:48 am
by Drofder2004
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.

Re: Final 2 questions I hope :-)

Posted: July 20th, 2010, 11:48 am
by <LT>YosemiteSam[NL]
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.

Re: Final 2 questions I hope :-)

Posted: July 20th, 2010, 12:25 pm
by waywaaaard
If you are ready to test I am going to upload it on our cod2 jump server :D

Re: Final 2 questions I hope :-)

Posted: July 20th, 2010, 12:57 pm
by <LT>YosemiteSam[NL]
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 ?

Re: Final 2 questions I hope :-)

Posted: July 20th, 2010, 1:38 pm
by waywaaaard
just the changed iwis in the iwd

Re: Final 2 questions I hope :-)

Posted: July 20th, 2010, 3:20 pm
by Drofder2004
[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.

Re: Final 2 questions I hope :-)

Posted: July 20th, 2010, 3:28 pm
by <LT>YosemiteSam[NL]
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 ?