Death Barrier?
Moderator: Core Staff
Death Barrier?
I'm making a pit and i need it so when players fall in it they die.. i've tried damage trigger but because its codjumper that doesnt work, how can i get a death barrier?
Re: Death Barrier?
Code: Select all
Â
main()
 {
   thread kill();
}
Â
kill()
 { Â
 your_trigger_name = getent("trigger","targetname");
  while (1)
  {
   trigger waittill ("trigger",player);
   if(player isTouching(trigger) )
   {
        player suicide();
 }
Â
   }
 }

Re: Death Barrier?
Thanks.. but im a noob, so...?
Re: Death Barrier?
Thanks.. but im a noob, so...?
Re: Death Barrier?
Yep, they both do the same thing.
Re: Death Barrier?
Sorry i really dont get coding or where to add that code, please can you add it for me and what do i have to do in radiant?
Code: Select all
main()
{
//maps\mp\mp_levels_fx::main();
//maps\createart\mp_levels_art::main();
maps\mp\_load::main();
//maps\mp\mp_levels_struct::main();
maps\mp\_teleport::main();
//maps\mp\_compass::setupMiniMap("compass_map_mp_backlot");
//setExpFog(500, 2200, 0.81, 0.75, 0.63, 0);
//VisionSetNaked( "mp_levels" );
ambientPlay("ambient_explicit_ext");
game["allies"] = "marines";
game["axis"] = "opfor";
game["attackers"] = "axis";
game["defenders"] = "allies";
game["allies_soldiertype"] = "desert";
game["axis_soldiertype"] = "desert";
setdvar( "r_specularcolorscale", "1" );
setdvar("r_glowbloomintensity0",".25");
setdvar("r_glowbloomintensity1",".25");
setdvar("r_glowskybleedintensity0",".3");
setdvar("compassmaxrange","1800");
thread quake();
}
quake()
{
trigger = getent("earthquake","targetname"); // this finds the entity you created (the trigger)
quake = getent("quake","targetname"); // this finds the entity you created (the origin named quke)
sound = getent("sound","targetname"); // this finds the entity you created (the origin named sound)
while (1)
{
trigger waittill ("trigger",user);
wait 1;
iprintlnbold( "EAARRTHHHQUUAAKKE!!!"); //prints inbold "EAARRTHHHQUUAAKKE!!!" to all the users on the map, feel free to change the text :)
sound PlaySound( "elm_quake_sub_rumble"); //plays the sound of an earthquake at the origin "sound"
Earthquake( 0.7, 8, quake.origin, 10000 ); // (magnitude of the earthquake, length, at what origin, and the radius) these values can be changed apart from the origin
wait 2;
}
}
Re: Death Barrier?
Code: Select all
main()
{
    //maps\mp\mp_levels_fx::main();
    //maps\createart\mp_levels_art::main();
    maps\mp\_load::main();
    //maps\mp\mp_levels_struct::main();  Â
    maps\mp\_teleport::main();
Â
    //maps\mp\_compass::setupMiniMap("compass_map_mp_backlot");
Â
    //setExpFog(500, 2200, 0.81, 0.75, 0.63, 0);
    //VisionSetNaked( "mp_levels" );
    ambientPlay("ambient_explicit_ext");
Â
    game["allies"] = "marines";
    game["axis"] = "opfor";
    game["attackers"] = "axis";
    game["defenders"] = "allies";
    game["allies_soldiertype"] = "desert";
    game["axis_soldiertype"] = "desert";
Â
    setdvar( "r_specularcolorscale", "1" );
Â
    setdvar("r_glowbloomintensity0",".25");
    setdvar("r_glowbloomintensity1",".25");
    setdvar("r_glowskybleedintensity0",".3");
    setdvar("compassmaxrange","1800");
Â
    thread quake();
thread kill();
}
Â
Â
Â
quake()
Â
{
trigger = getent("earthquake","targetname"); // this finds the entity you created (the trigger)
quake = getent("quake","targetname"); Â Â Â // this finds the entity you created (the origin named quke)
sound = getent("sound","targetname"); Â Â Â // this finds the entity you created (the origin named sound)
while (1)
Â
  {
  trigger waittill ("trigger",user);
  wait 1;
  iprintlnbold( "EAARRTHHHQUUAAKKE!!!");   //prints inbold "EAARRTHHHQUUAAKKE!!!" to all the users on the map, feel free to change the text :)
  sound PlaySound( "elm_quake_sub_rumble");  //plays the sound of an earthquake at the origin "sound"
  Earthquake( 0.7, 8, quake.origin, 10000 ); // (magnitude of the earthquake, length, at what origin, and the radius) these values can be changed apart from the origin
  wait 2;
  }
}
kill()
{
your_trigger_name = getent("trigger","targetname");
while (1)
{
trigger waittill ("trigger",player);
player suicide();
}
}
in radiant just create a trigger multiple....press N ---> key:targetname value:your_trigger_name

Re: Death Barrier?
or
then create a new .gsc file called mp_yourmapname_kill
finally in the upload zone file add this line:
rawfile,maps/mp/mp_yourmapname_kill.gsc
Code: Select all
main()
{
    //maps\mp\mp_levels_fx::main();
    //maps\createart\mp_levels_art::main();
    maps\mp\_load::main();
    //maps\mp\mp_levels_struct::main();  Â
    maps\mp\_teleport::main();
    maps\mp\mp_yuormapname_kill::main();
Â
    //maps\mp\_compass::setupMiniMap("compass_map_mp_backlot");
Â
    //setExpFog(500, 2200, 0.81, 0.75, 0.63, 0);
    //VisionSetNaked( "mp_levels" );
    ambientPlay("ambient_explicit_ext");
Â
    game["allies"] = "marines";
    game["axis"] = "opfor";
    game["attackers"] = "axis";
    game["defenders"] = "allies";
    game["allies_soldiertype"] = "desert";
    game["axis_soldiertype"] = "desert";
Â
    setdvar( "r_specularcolorscale", "1" );
Â
    setdvar("r_glowbloomintensity0",".25");
    setdvar("r_glowbloomintensity1",".25");
    setdvar("r_glowskybleedintensity0",".3");
    setdvar("compassmaxrange","1800");
Â
    thread quake();
    thread kill();
}
Â
Â
Â
quake()
Â
{
trigger = getent("earthquake","targetname"); // this finds the entity you created (the trigger)
quake = getent("quake","targetname"); Â Â Â // this finds the entity you created (the origin named quke)
sound = getent("sound","targetname"); Â Â Â // this finds the entity you created (the origin named sound)
while (1)
Â
  {
  trigger waittill ("trigger",user);
  wait 1;
  iprintlnbold( "EAARRTHHHQUUAAKKE!!!");   //prints inbold "EAARRTHHHQUUAAKKE!!!" to all the users on the map, feel free to change the text :)
  sound PlaySound( "elm_quake_sub_rumble");  //plays the sound of an earthquake at the origin "sound"
  Earthquake( 0.7, 8, quake.origin, 10000 ); // (magnitude of the earthquake, length, at what origin, and the radius) these values can be changed apart from the origin
  wait 2;
  }
}
Â
Â
Â
Code: Select all
Â
Â
main()
Â
 {
  thread kill();
 }
Â
Â
kill()
Â
 { Â
Â
 your_trigger_name = getent("trigger","targetname");
Â
  while (1)
Â
  {
   trigger waittill ("trigger",player);
Â
       player suicide();
   }
Â
 }
rawfile,maps/mp/mp_yourmapname_kill.gsc

Re: Death Barrier?
it doesn't work:( something wrong with this line 'trigger waittill ("trigger",player);'
heres what my file looks like
heres what my file looks like
Code: Select all
main()
{
thread kill();
}
kill()
{
your_trigger_name = getent( "trigger","targetname" );
while (1)
{
trigger waittill ("trigger",player);
if(player isTouching(trigger) )
}
}
}
Re: Death Barrier?
you have trigger waittill yet you have used your_trigger_name for the actual trigger, use one
Code: Select all
main()
{
thread kill();
}
kill()
{
trigger = getent( "trigger","targetname" );
while (1)
{
trigger waittill ("trigger",player);
if(player isTouching(trigger) )
}
player suicide();
}
}
Re: Death Barrier?
I would change the name "trigger", since it can be confusing
And I would just add a new function to your .gsc, otherwise you will have to compile the new gsc too.
So, in your_map.gsc
And I would just add a new function to your .gsc, otherwise you will have to compile the new gsc too.
So, in your_map.gsc
Code: Select all
main()
{
........
thread Deathtrigger();
}
Deathtrigger()
{
trigger = getent( "Deathtrigger","targetname" ); // Deathtrigger is the name you need to give your trigger in radiant
while (1)
{
trigger waittill ("trigger",player);
player suicide();
}
}
Who is online
Users browsing this forum: No registered users and 1 guest