Author Topic: AC130 NUKE SOLVED!  (Read 7021 times)

Offline gadjex

  • Rank: Private
  • *
  • Posts: 38
AC130 NUKE SOLVED!
« on: October 10, 2008, 06:48:02 am »
Sry I haven't been on much lately. I've been busy with my first born almost here.

Anyways I found the problem with being blown out of the AC130 while in a Nuke strike.

- Open up extreme\_ex_main.gsc
- Line # 453 will be this: if(sWeapon == "nuke_mp" || sWeapon == "helicopter_mp" ) thread maps\mp\_ac130::ac130_detachPlayer();
That means if someone was killed with a nuke or helicopter, it will detach that person killed on the ground, from the AC130, bumping the person in there out.
- To fix add two forward slashes at the beginning of this line like this: //if(sWeapon == "nuke_mp" || sWeapon == "helicopter_mp" ) thread maps\mp\_ac130::ac130_detachPlayer();

I also have done some work fixing other issues with the AC130. It's not isolated to 1 file or a quick fix like posted above. When I get some free time I'll do a write up.

Here is what I fixed:
- AC130 will not be chosen when switching between primary and secondary weapons.
- Added and fixed the missing text "AC130 is not available" when choosing AC130 as a weapon and it is occupied.
- Fixed the problem with earning WMDs while in the AC130. What I did was monitor if one was earned, take it away so it can't be used while in the AC130 and give it back before respawning on the map.
- Fixed problem with round based gametypes. First round is ok, other rounds the plane isn't in the sky to spawn in so you are on the ground with the AC130 weapon! lol My fix will recreate the plane in the sky if it is not there. It works with a minor bug I'm working out.
- Added text to be displayed on the lower left corner when someone enters and exits the AC130. It displays who enter and exits.
- Added the Timer to my file that was posted by SniperOne.

I also fixed the end of game voting to my liking. The blue select highlight bar doesn't always show up. It's a problem with too many HUD elements. What I did was made the map voting only on 1 page (lesser maps to vote from), removed the title, title background and page # hud elements, and shortened the background where it had the title.

I'll post the "_ex_mapvote.gsc" file up if anyone is interested.

Gadjex

Offline stufz

  • Rank: Private
  • *
  • Posts: 302
    • http://theblackduck.net
Re: AC130 NUKE SOLVED!
« Reply #1 on: October 10, 2008, 07:37:04 am »
WOW ! 2 fixes for the AC130 - 1 by redrock and 1 by gadjex - WOOT !!

I use the votemap to show next map but yah I'd like to see your votemap.gsc .... what with voting day coming round, maybe i can get my guys to use the vote thing like a good player does :]

wait a minute, dont you mean "being blown out of the ac130 while a nuke is running" ?  :P


yah, ASP sniperone  http://mycallofduty.com/modules.php?name=Forums&file=viewtopic&t=2513


got a questiion - how is your script for restoring hardpoints earned in gunship different from redrocks ?
in the ac130.gsc, 3 times

Code: [Select]
//Put weapons and health back
   self resetWeapons(weaponsList, ammoClipList, ammoStockList);
   self.health = originalHealth;
   self thread maps\mp\gametypes\_hardpoints::giveOwnedHardpointItem(); //fix for losing earned hardpoints by |EAS|Redrock

Offline redrock

  • Rank: Private
  • *
  • Posts: 119
    • http://easclan.org
Re: AC130 NUKE SOLVED!
« Reply #2 on: October 10, 2008, 01:19:04 pm »
awesome gadjex!!! added to our server.

Offline coRpSE

  • Rank: Private
  • *
  • Posts: 24
    • http://www.headshotdomain.net
Re: AC130 NUKE SOLVED!
« Reply #3 on: October 11, 2008, 04:21:00 am »
Anyone have a fix for the sniper zoom being messed up after you leave the AC 103?

Offline FewPeople

  • Rank: Private
  • *
  • Posts: 206
    • http://www.xanthiserver.dyndns.org
Re: AC130 NUKE SOLVED!
« Reply #4 on: October 11, 2008, 06:01:57 am »
really wierd , the 2 //'s was allready in my config ,and i dont remember ever doing it .

Offline gadjex

  • Rank: Private
  • *
  • Posts: 38
Re: AC130 NUKE SOLVED!
« Reply #5 on: October 12, 2008, 10:43:26 pm »
Quote from: "stufz";p="21493"
WOW ! 2 fixes for the AC130 - 1 by redrock and 1 by gadjex - WOOT !!

I use the votemap to show next map but yah I'd like to see your votemap.gsc .... what with voting day coming round, maybe i can get my guys to use the vote thing like a good player does :]

wait a minute, dont you mean "being blown out of the ac130 while a nuke is running" ?  :P


yah, ASP sniperone  http://mycallofduty.com/modules.php?name=Forums&file=viewtopic&t=2513


got a questiion - how is your script for restoring hardpoints earned in gunship different from redrocks ?
in the ac130.gsc, 3 times

Code: [Select]
//Put weapons and health back
   self resetWeapons(weaponsList, ammoClipList, ammoStockList);
   self.health = originalHealth;
   self thread maps\mp\gametypes\_hardpoints::giveOwnedHardpointItem(); //fix for losing earned hardpoints by |EAS|Redrock

Yeah, get blown out of the AC130 with a Nuke! lol Thanks.

Here is my _ex_mapvote.gsc http://www.gadjex.com/cod_help/cod4/_ex_mapvote.gsc

My approach is a little different for the earned hardpoints:

All code is in maps/mp/_ac130.gsc

Added new function "watchEarnedHardpoints":
Code: [Select]
watchEarnedHardpoints()
{
   level endon("ex_gameover");
   self endon("disconnect");
   self endon("death");
   self endon("ac130_detached");

   for(;;)
   {
      if ( isDefined ( self.pers["hardPointItem"] ) )
      {
        self.gx_hardpoint = self.pers["hardPointItem"];
        self takeWeapon( self.gx_hardpoint );
self setActionSlot( 4, "" );
self.pers["hardPointItem"] = undefined;
      }
      wait 0.05;
   }
}


In each of these functions: ac130_attachPlayer_105mm(), ac130_attachPlayer_40mm(), ac130_attachPlayer_25mm().
Add this code after "thread shotFired();"
Code: [Select]
self.pers["hardPointItem"] = undefined;
   thread watchEarnedHardpoints();

In my "resetWeapons" Function I added this at the beginning:
Code: [Select]
hardpointType = undefined;
  
  if ( isDefined( self.gx_hardpoint ) )
  {
    hardpointType = self.gx_hardpoint;
    self.gx_hardpoint = undefined;
  }

and this close to the end of the function:
Code: [Select]
if ( isDefined( hardpointType ) )
  {
    self giveWeapon( hardpointType );
   self giveMaxAmmo( hardpointType );
   self setActionSlot( 4, "weapon", hardpointType );
   self.pers["hardPointItem"] = hardpointType;
  }

The whole "resetWeapons" function:
Code: [Select]
resetWeapons(weaponsList, ammoClipList, ammoStockList) // =[SUPER]=Gadjex
{
  useAltMode = true;
  
  hardpointType = undefined;
  
  if ( isDefined( self.gx_hardpoint ) )
  {
    hardpointType = self.gx_hardpoint;
    self.gx_hardpoint = undefined;
  }
  
  self takeAllWeapons();
  
class = self.class;
  self maps\mp\gametypes\_class::setClass( class );

// initialize specialty array
self.specialty = [];
self.specialty[0] = self.pers[class]["loadout_perk1"];
self.specialty[1] = self.pers[class]["loadout_perk2"];
self.specialty[2] = self.pers[class]["loadout_perk3"];

self maps\mp\gametypes\_class::register_perks();
  
  if ( getDvarInt( "scr_enable_nightvision" ) )
self setActionSlot( 1, "nightvision" );

  for( i = 0; i < weaponsList.size; i++ )
{
 if ( !AC130Weapons(weaponsList[i]) )
 {
  //logprint("weaponGivenBack " + i + " = " + weaponsList[i] + " ");
  //logprint("Clip " + i + " = " + ammoClipList[i] + " ");
  //logprint("StockPile " + i + " = " + ammoStockList[i] + "
");
  self giveWeapon( weaponsList[i] );
}

//Set primary weapon to spawn with.
if ( isPrimaryWeapon (weaponsList[i]) && WeaponType( weaponsList[i] ) == "bullet" )
   {
        self setSpawnWeapon( weaponsList[i] );
        //logprint(weaponsList[i] + " " + WeaponType(weaponsList[i]) + "
");
        }

switch ( weaponsList[i]) //Set offhand setttings
{
      case "frag_grenade_mp":
        self switchToOffhand( "frag_grenade_mp" );
        break;
      case "flash_grenade_mp":
        self setOffhandSecondaryClass("flash");
        break;
      case "smoke_grenade_mp":
      case "concussion_grenade_mp":
        self setOffhandSecondaryClass("smoke");
        break;
    }

switch ( weaponsList[i] ) //Setup ammo sizes and action slots 3,4
   {
   case "claymore_mp":
   case "rpg_mp":
   case "c4_mp":
   self maps\mp\gametypes\_class::setWeaponAmmoOverall( weaponsList[i], ammoClipList[i] );
   self setActionSlot( 3, "weapon", weaponsList[i] );
   self setActionSlot( 4, "" );
   useAltMode = false;
   break;
   default:
    self setWeaponAmmoClip( weaponsList[i], ammoClipList[i] );
    self setWeaponAmmoStock( weaponsList[i], ammoStockList[i] );
   break;
   }
}
if ( useAltMode ) //Set to altmode if alt. weapon is not claymore, rpg, or c4
{
    self setActionSlot( 3, "altMode" );
   self setActionSlot( 4, "" );
  }
  
  if ( isDefined( hardpointType ) )
  {
    self giveWeapon( hardpointType );
   self giveMaxAmmo( hardpointType );
   self setActionSlot( 4, "weapon", hardpointType );
   self.pers["hardPointItem"] = hardpointType;
  }
  
  // cac specialties that require loop threads
self maps\mp\gametypes\_class::cac_selector();
}


The logic is this: Watch if they earn a hardpoint. If so then take it away and store it in self.gx_hardpoint. When reseting the weapons for that player, give them back the hardpoint so they will have it when they respawn.

Offline gadjex

  • Rank: Private
  • *
  • Posts: 38
Re: AC130 NUKE SOLVED!
« Reply #6 on: October 12, 2008, 10:45:20 pm »
Quote from: "coRpSE";p="21561"
Anyone have a fix for the sniper zoom being messed up after you leave the AC 103?

Never had that problem. From what I know of. I'll keep an eye out though.

Offline stufz

  • Rank: Private
  • *
  • Posts: 302
    • http://theblackduck.net
Re: AC130 NUKE SOLVED!
« Reply #7 on: October 13, 2008, 07:29:58 am »
YoW !! does the gsc have all of the fixes below ?

Quote from: "gadjex";p="21491"


Here is what I fixed:
- AC130 will not be chosen when switching between primary and secondary weapons.
- Added and fixed the missing text "AC130 is not available" when choosing AC130 as a weapon and it is occupied.
- Fixed the problem with earning WMDs while in the AC130. What I did was monitor if one was earned, take it away so it can't be used while in the AC130 and give it back before respawning on the map.
- Fixed problem with round based gametypes. First round is ok, other rounds the plane isn't in the sky to spawn in so you are on the ground with the AC130 weapon! lol My fix will recreate the plane in the sky if it is not there. It works with a minor bug I'm working out.
- Added text to be displayed on the lower left corner when someone enters and exits the AC130. It displays who enter and exits.
- Added the Timer to my file that was posted by SniperOne.

I also fixed the end of game voting to my liking. The blue select highlight bar doesn't always show up. It's a problem with too many HUD elements. What I did was made the map voting only on 1 page (lesser maps to vote from), removed the title, title background and page # hud elements, and shortened the background where it had the title.

I'll post the "_ex_mapvote.gsc" file up if anyone is interested.

Gadjex

Offline gadjex

  • Rank: Private
  • *
  • Posts: 38
Re: AC130 NUKE SOLVED!
« Reply #8 on: October 13, 2008, 08:48:09 am »
- AC130 will not be chosen when switching between primary and secondary weapons.
This is in the weapons files located in the mods iwd - weapons/mp: ac130_25mm_mp, ac130_40mm_mp, ac130_105mm_mp.

Search for this in each file: inventoryType\primary
Change to this: inventoryType\item

Here are the weapon files to download if your not sure of the changes (they go in the iwd - weapons/mp):
http://www.gadjex.com/cod_help/cod4/ac130_25mm_mp
http://www.gadjex.com/cod_help/cod4/ac130_40mm_mp
http://www.gadjex.com/cod_help/cod4/ac130_105mm_mp

- Added and fixed the missing text "AC130 is not available" when choosing AC130 as a weapon and it is occupied.
This is in maps\mp\gametypes\_hardpoints.gsc

Search for this: else if ( hardpointType == "ac130_25mm_mp" ) and this: else if ( hardpointType == "ac130_40mm_mp" ) and this: else if ( hardpointType == "ac130_105mm_mp" )

replace this:
Code: [Select]
if ( isDefined( level.ac130Player ) )
{
self iPrintLnBold( level.hardpointHints[hardpointType+"_not_available"] );
return false;
}
With this new code (3 times, 1 for each type of AC130 gun):
Code: [Select]
if ( isDefined( level.ac130Player ) )
{
if ( level.ac130Player != self ) self iPrintLnBold( level.hardpointHints[hardpointType+"_not_available"] );
return false;
}

Search for this: level.hardpointHints["ac130_25mm_mp_not_available"] = " ";

Replace this:
Code: [Select]
level.hardpointHints["ac130_25mm_mp_not_available"] = " ";
level.hardpointHints["ac130_40mm_mp_not_available"] = " ";
level.hardpointHints["ac130_105mm_mp_not_available"] = " ";

With this new code:
Code: [Select]
level.hardpointHints["ac130_25mm_mp_not_available"] = &"EXTREME_AC130_25_NOT_AVAILABLE";
level.hardpointHints["ac130_40mm_mp_not_available"] = &"EXTREME_AC130_40_NOT_AVAILABLE";
level.hardpointHints["ac130_105mm_mp_not_available"] = &"EXTREME_AC130_105_NOT_AVAILABLE";
Fixed _hardpoints.gsc file: http://www.gadjex.com/cod_help/cod4/_hardpoints.gsc

- Added text to be displayed on the lower left corner when someone enters and exits the AC130. It displays who enter and exits.
In maps/mp/_ac130.gsc

Respectfully replace this: iprintln("^3AC130 25MM GUNSHIP INBOUND ^1TAKE COVER!"); and this: iprintln("^3AC130 40MM GUNSHIP INBOUND ^1TAKE COVER!"); and this: iprintln("^3AC130 105MM GUNSHIP INBOUND ^1TAKE COVER!");

With this: iprintln(self.name + " ^2 IS IN THE AC130 WITH A 25MM GUN!!"); and this: iprintln(self.name + " ^2 IS IN THE AC130 WITH A 40MM GUN!!"); and this: iprintln(self.name + " ^2 IS IN THE AC130 WITH A 105MM GUN!!");

Search for this: self thread CleanupSpawned();
Add this below it: iprintln(self.name + " ^2 HAS LEFT THE AC130 AIRSHIP!!");

- Fixed problem with round based gametypes. First round is ok, other rounds the plane isn't in the sky to spawn in so you are on the ground with the AC130 weapon! lol My fix will recreate the plane in the sky if it is not there. It works with a minor bug I'm working out.
I haven't yet completed this. There is a minor bug to be worked out. I'll post my final _ac130.gsc when finished. This includes includes all fixes and SinperOne's timer.

Offline 0Gravity

  • Rank: Private
  • *
  • Posts: 41
Re: AC130 NUKE SOLVED!
« Reply #9 on: October 14, 2008, 03:09:15 pm »
gadjex
That would be great if you could post that GSC file when your done with it.
Mike

Offline PvtGomerPyle

  • Rank: Private
  • *
  • Posts: 577
Re: AC130 NUKE SOLVED!
« Reply #10 on: October 14, 2008, 09:15:20 pm »
Thanks Gadjex

Super job wrapping  ALL the tweaks up in one package. Looking forward to the final release!!!  :wink:  :wink:

Offline X4A_US_Wannabe

  • Rank: Private
  • *
  • Posts: 137
    • http://www.x4aftermath.com
Re: AC130 NUKE SOLVED!
« Reply #11 on: November 09, 2008, 11:44:13 am »
Quote
Fixed problem with round based gametypes. First round is ok, other rounds the plane isn't in the sky to spawn in so you are on the ground with the AC130 weapon! lol My fix will recreate the plane in the sky if it is not there. It works with a minor bug I'm working out.

Any news on this?
Everything works great, except those darn 'round based' gametypes.

I've tried to 'turn off' or set the required kills to 999 on SD maps, but that didn't seem to work.
 set ex_wmd_ac130_25mm_sd "999"

Would love to have your fix in place.

Anyone else battling with this?  How are you getting around the problem of players in round based maps aquiring the AC-130, and staying on the ground "invisible" and with a 25MM or higher gun??

Offline akillj360

  • Rank: Private
  • *
  • Posts: 27
Re: AC130 NUKE SOLVED!
« Reply #12 on: August 10, 2009, 04:01:15 pm »
Awesome :D

would love to see all of this in 3.0 when its out.