Page 1 of 5

Final 2 questions I hope :-)

Posted: July 18th, 2010, 10:00 pm
by <LT>YosemiteSam[NL]
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

Re: Final 2 questions I hope :-)

Posted: July 18th, 2010, 10:22 pm
by Soviet
Not sure since it is CoD2, but shouldn't it be setdvar, not setcvar?

Re: Final 2 questions I hope :-)

Posted: July 18th, 2010, 10:24 pm
by Rezil
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.

Re: Final 2 questions I hope :-)

Posted: July 18th, 2010, 11:30 pm
by waywaaaard
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!

Re: Final 2 questions I hope :-)

Posted: July 18th, 2010, 11:44 pm
by Rezil
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?

Re: Final 2 questions I hope :-)

Posted: July 18th, 2010, 11:58 pm
by Rezil
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?

Re: Final 2 questions I hope :-)

Posted: July 19th, 2010, 2:19 am
by Drofder2004
Cushion has no sound when walking on it, create custom textures will remove this problem.

Re: Final 2 questions I hope :-)

Posted: July 19th, 2010, 10:38 am
by <LT>YosemiteSam[NL]
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 ?

Re: Final 2 questions I hope :-)

Posted: July 19th, 2010, 10:57 am
by waywaaaard
no they can turn the client console back on in the options and even I have a noclip bind. Don't do this!

Re: Final 2 questions I hope :-)

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

Re: Final 2 questions I hope :-)

Posted: July 19th, 2010, 11:57 am
by waywaaaard
they can easily turn back on

Re: Final 2 questions I hope :-)

Posted: July 19th, 2010, 12:02 pm
by <LT>YosemiteSam[NL]
Aha, ok. In that case I won't turn it on :)

Re: Final 2 questions I hope :-)

Posted: July 19th, 2010, 12:06 pm
by waywaaaard
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

Re: Final 2 questions I hope :-)

Posted: July 19th, 2010, 12:16 pm
by <LT>YosemiteSam[NL]
LOL...don't wanna do that then...uhm...well.... I'll make 2 versions then :wink:

Re: Final 2 questions I hope :-)

Posted: July 19th, 2010, 1:22 pm
by Drofder2004
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.