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:

Final 2 questions I hope :-)

Post by <LT>YosemiteSam[NL] » July 18th, 2010, 10:00 pm

Ok, I'm finalizing my map but encoutered 2 problems;

1) When I restart the map (after playing it once) the sound which plays at 5minutes doesn't play anymore.
It plays perfectly the first time playing the map.

2) I put the following cvars in my gsc ;

Code: Select all

setcvar ("jump_height" ,"55");
setcvar ("bg_fallDamageMinHeight", "100000"); 
setcvar ("bg_fallDamageMaxHeight", "200000");
But they only work when I use devmap cause they are cheat protected. Anyone know how to work around that ?

Thx,

Sam

Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Re: Final 2 questions I hope :-)

Post by Soviet » July 18th, 2010, 10:22 pm

Not sure since it is CoD2, but shouldn't it be setdvar, not setcvar?
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Final 2 questions I hope :-)

Post by Rezil » July 18th, 2010, 10:24 pm

You can work around fall damage by using the cushion texture found in jm_castle and other maps. It looks like a bubbles texture and is invisible ingame. Just cover every floor with it and you won't have any fall damage anywhere. As for jump_height, I doubt you can work around that.

Post your script for the 5 minutes remaining sound.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

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 18th, 2010, 11:30 pm

Rezil wrote:You can work around fall damage by using the cushion texture found in jm_castle and other maps. It looks like a bubbles texture and is invisible ingame. Just cover every floor with it and you won't have any fall damage anywhere. As for jump_height, I doubt you can work around that.

Post your script for the 5 minutes remaining sound.
don't use the cushion texture if you want to remove the fall damage on your whole map

better make your custom textures in the assman again and scroll down in the material options and tick the nofalldamage!
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
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Final 2 questions I hope :-)

Post by Rezil » July 18th, 2010, 11:44 pm

waywaaaard wrote: don't use the cushion texture if you want to remove the fall damage on your whole map
What's wrong with the cushion texture?
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: Final 2 questions I hope :-)

Post by Rezil » July 18th, 2010, 11:58 pm

Yeah but what if he wanted to use those textures somewhere else/somebody else used them in another (jump) map. It's better to cushion the floors.
just easier + neater
How is it easier to re-do all of his textures than simply add one and make a few more brushes in the map?
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

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 19th, 2010, 2:19 am

Cushion has no sound when walking on it, create custom textures will remove this problem.
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 19th, 2010, 10:38 am

Rezil wrote: Post your script for the 5 minutes remaining sound.
Ok here is my gsc;

Code: Select all

#include maps\mp\_weapon_pickup;
main()
{

maps\mp\_load::main();
precacheitem("panzerschreck_mp");
precacheitem("bar_mp");
precacheitem("mosin_nagant_mp");
precacheitem("springfield_mp");
precacheitem("m1carbine_mp");
precacheitem("ppsh_mp");
precacheitem("m1garand_mp");
precacheitem("kar98k_mp");
precacheitem("enfield_scope_mp");
precacheitem("shotgun_mp");
precacheitem("frag_grenade_german_mp");
precacheitem("mp44_mp");

ambientPlay("ambient_mp_deck16");
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();

game["allies"] = "british";
game["axis"] = "german";
game["british_soldiertype"] = "airborne";
game["british_soldiervariation"] = "normal";
game["german_soldiertype"] = "fallschirmjagergrey";
game["german_soldiervariation"] = "normal";
game["attackers"] = "allies";
game["defenders"] = "axis";

setcvar ("g_gravity", "800");
setcvar ("g_speed" , "300");
setcvar ("jump_height" ,"55");
setcvar ("bg_fallDamageMinHeight", "100000"); 
setcvar ("bg_fallDamageMaxHeight", "200000");
setcvar ("scr_dm_timelimit" , "5.3");

setupWeaponForPickup("bren_mp", "xmodel/weapon_bren","weap_pickup", 30);
setupWeaponForPickup("panzerschreck_mp", "xmodel/weapon_panzerschreck","redeemer_pickup", 90);
setupWeaponForPickup("m1garand_mp", "xmodel/weapon_m1garand","weap_pickup", 30);
setupWeaponForPickup("shotgun_mp", "xmodel/weapon_trenchgun","weap_pickup", 30);
setupWeaponForPickup("bar_mp", "xmodel/weapon_bar","dam_amp_pickup", 90);
setupWeaponForPickup("mosin_nagant_mp", "xmodel/weapon_mosinnagant","weap_pickup", 30);
setupWeaponForPickup("m1carbine_mp", "xmodel/weapon_m1carbine","weap_pickup", 30);
setupWeaponForPickup("springfield_mp", "xmodel/weapon_springfield","weap_pickup", 30);
setupWeaponForPickup("mosin_nagant_mp", "xmodel/weapon_mosinnagant","weap_pickup", 30);
setupWeaponForPickup("ppsh_mp", "xmodel/weapon_ppsh","weap_pickup", 30);
setupWeaponForPickup("kar98k_mp", "xmodel/weapon_kar98","weap_pickup", 30);
setupWeaponForPickup("enfield_scope_mp", "xmodel/weapon_enfield_scope","weap_pickup", 30);
setupWeaponForPickup("frag_grenade_german_mp", "xmodel/weapon_nebelhandgrenate","weap_pickup", 30);
setupWeaponForPickup("mp44_mp", "xmodel/weapon_mp44","weap_pickup", 30);

WeaponRespawner("frags", 60);
}
WeaponRespawner(targetname, defaultrespawndelay)
{
// by sentchy
  weapons = getentarray(targetname, "targetname");
  if(weapons.size > 0)
  {
    for(i=0; i < weapons.size; i++)
    {
    if(!isdefined(weapons[i].script_timescale))
    weapons[i].script_timescale = defaultrespawndelay;
    // kick off a thread to listen for when the item gets picked up
    weapons[i] thread weapon_think(weapons[i].script_timescale);
    }
  }
}

// self = weapon reference
weapon_think(delaytime)
{
  // capture important weapon data first to allow us to respawn them
  classname = self.classname;
  model = self.model;
  count = self.count;
  org = self.origin;
  angles = self.angles;
  targetname = self.targetname;
  flags = self.spawnflags;
  // Wait till the weapon gets picked up
  self waittill("trigger");
  
// Wait the delay before respawn
  wait delaytime;

  // respawn the weapon
  weapon = spawn(classname, org, flags);
  weapon.angles = angles;
  weapon.count = count;
  weapon setmodel(model);
  weapon.script_timescale = delaytime;
  weapon.targetname = targetname;
  weapon playsound("spawnsound");
  
// Kick off a new thread with the new weapon and kill the old one
  weapon thread weapon_think(delaytime);
}
Here is the 5minutes gsc;

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;
}
And here is my 5 minutes csv part;

Code: Select all

#   ///fiveminutes///
fiveminutes,,misc/fiveminutes.wav,1,1,,,,,,local,streamed,,,,mp_deck16
And for that texture thing I'll try that, but can I also set "devmap on" in the gsc file itself and then turn client console off, so they can't cheat ? Then both the jump_height and falldamage will work...right ?

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, 10:57 am

no they can turn the client console back on in the options and even I have a noclip bind. Don't do this!
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, 11:53 am

I'm the server admin so I can turn off the client console on my server right ? Or can they just as easily turn it back on ?
Cause I realy need that jump_height cvar, makes the gameplay much quicker and smoother (and feels more like UT99).

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, 11:57 am

they can easily turn back on
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, 12:02 pm

Aha, ok. In that case I won't turn it on :)

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, 12:06 pm

People won't like your map because the most people are using the console to change fps draw the fps and change name. You really would piss them off :P
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, 12:16 pm

LOL...don't wanna do that then...uhm...well.... I'll make 2 versions then :wink:

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 19th, 2010, 1:22 pm

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.
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

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests