Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 44 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Radiation Zones
TFD|Gumpi
General Member
Since: Aug 28, 2008
Posts: 37
Last: May 16, 2009
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Sunday, Mar. 29, 2009 10:39 am
How can I add radioactive zones to my mp map ? I already know, how to make minefields but I have no idea, how i can make radioactive areas.

edited on Mar. 29, 2009 06:41 am by TFD|Gumpi
Share |
novemberdobby
General Member
Since: Sep 17, 2006
Posts: 1965
Last: Oct 13, 2013
[view latest posts]
Level 8
Forum Moderator
Category: CoD4 Scripting
Posted: Sunday, Mar. 29, 2009 10:58 am
You could do it by putting trigger_multiples down like the minefields, giving them a targetname of radzone, and using something like this in your map .gsc:

Code:

//put this in main() somewhere
thread radiation();



//then this outside it
radiation()
{
   rads = getentarray("radzone", "targetname");

   for(i = 0; i < rads.size; i++)
      rads[i] thread onEnter();
}

onEnter()
{
   while(1)
   {
      self waittill("trigger", player);
      player shellshock("default", 1);
      wait 0.5;
   }
}
Share |
TFD|Gumpi
General Member
Since: Aug 28, 2008
Posts: 37
Last: May 16, 2009
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Monday, Mar. 30, 2009 12:40 pm
This is working, but it doesen't look like radiation and it doesen't kill people, i want to make radioactive areas, which kill people and which do look like the ones in Singleplayer. But btw nice work and thanks for your help.
Share |
novemberdobby
General Member
Since: Sep 17, 2006
Posts: 1965
Last: Oct 13, 2013
[view latest posts]
Level 8
Forum Moderator
Category: CoD4 Scripting
Posted: Monday, Mar. 30, 2009 12:47 pm
Ok. Try modding it to:

Code:

then this outside it
radiation()
{
   rads = getentarray("radzone", "targetname");

   for(i = 0; i < rads.size; i++)
      rads[i] thread onEnter();
}

onEnter()
{
   while(1)
   {
      self waittill("trigger", player);
      player shellshock("radiation_med", 3);

      if(isdefined(player.radcount))
         player.radcount++;
      else
         player.radcount = 0;

      if(player.radcount >= 120)
      {
         player suicide();
         player.radcount = 0;
      }

      wait 0.5;
   }
}


there, that means every time they go into one they'll be come more irradiated - if you want the level to go down when they aren't in one then I can do that, oh and add:

rawfile,shock/radiation_med.shock

to your zone source/missing assets file.

edited on Mar. 30, 2009 08:47 am by NovemberDobby
Share |
TFD|Gumpi
General Member
Since: Aug 28, 2008
Posts: 37
Last: May 16, 2009
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Monday, Mar. 30, 2009 01:14 pm
I think that I just found what we were looking for, there is a .gsc file in the raw/maps folder, which is named _radiation.gsc and next to it there is a file that is called _minefield.gsc. I think the _radiation.gsc file is the one used in singleplayer. But I do not know, how to use the _radiation.gsc in my map. I have already tried using it with key:targetname value:radiation. Do you have any idea, how I could use this .gsc file?
Share |
novemberdobby
General Member
Since: Sep 17, 2006
Posts: 1965
Last: Oct 13, 2013
[view latest posts]
Level 8
Forum Moderator
Category: CoD4 Scripting
Posted: Monday, Mar. 30, 2009 02:50 pm
You'd have to mod it a lot to get it working in MP, it's really a lot simpler to try a little homemade script.
Share |
TFD|Gumpi
General Member
Since: Aug 28, 2008
Posts: 37
Last: May 16, 2009
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Saturday, Apr. 25, 2009 02:35 pm
This is not working for me. I've done everything you've said but it is not working, if I enable developer it tells me, that radiation_med has not been precached. But I've already added rawfile,shock/radiation_med.shock to my csv.
Share |
novemberdobby
General Member
Since: Sep 17, 2006
Posts: 1965
Last: Oct 13, 2013
[view latest posts]
Level 8
Forum Moderator
Category: CoD4 Scripting
Posted: Saturday, Apr. 25, 2009 03:05 pm
try adding:

Code:

PrecacheShellShock("radiation_med");


inside the main() function of your map gsc.
Share |
TFD|Gumpi
General Member
Since: Aug 28, 2008
Posts: 37
Last: May 16, 2009
[view latest posts]
Level 2
Category: CoD4 Scripting
Posted: Saturday, Apr. 25, 2009 03:23 pm
It is working now. Thank you a lot. I own you one.
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»