UGX-Mods

Call of Duty 5: World at War => Downloadable Items for Mappers => Custom Maps, Mods & Tools => Scripts => Topic started by: MakeCents on October 02, 2014, 04:42:05 am

Title: Arsenal, your weapons drop when you die (updated 11-30-14)
Post by: MakeCents on October 02, 2014, 04:42:05 am
Arsenal will drop your weapons after you die and give you and the other players 60 seconds to pick them back up or swap out their guns. This does nothing on single player.

Arsenal (http://www.youtube.com/watch?v=dHkffWiu8KA#)

v1.1 - fixed damamge overide glitch and solo revive glitch
v1.2 - fixed crash game after spawning back in after weapons time out
INSTRUCTIONS
Download Arsenal.rar
Extract the files
Put the _prefabs folder in your root\map_source folder
-Radiant
In Radiant insert the arsenal prefab from root_map_source\_prefabs\Arsenol\ (Not the others, just arsenal.map, it will have everything you need.)
Put the prefab beneath your map, out of your map playable area.
Compile your map
-Scripts
Put the _mc_arsenal.gsc in your root\mods\nazi_zombie_mapname\maps\ folder
Open your _zombiemode.gsc
Find this function:
Code Snippet
Plaintext
player_damage_override( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, modelIndex, psOffsetTime )
{
Change it to this:
Code Snippet
Plaintext
player_damage_override( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, modelIndex, psOffsetTime )
{
self.down1 = [];
self.down2 = [];
weapons = self GetWeaponsListPrimaries();
self.down1[0] = weapons[0];
self.down1[1] = self GetWeaponAmmoClip( weapons[0] );
self.down1[2] = self GetWeaponAmmoStock( weapons[0] );
if(weapons.size>1){
self.down2[0] = weapons[1];
self.down2[1] = self GetWeaponAmmoClip( weapons[1] );
self.down2[2] = self GetWeaponAmmoStock( weapons[1] );
}
Open your nazi_zombie_mapname.gsc and find the following:
Code Snippet
Plaintext
    maps\_zombiemode::main();
and put maps\_mc_arsenal::init(); under it like this:
Code Snippet
Plaintext
    maps\_zombiemode::main();
    maps\_mc_arsenal::init();
Check the maps/_mc_arsenal.gsc in your mod builder and build your mod.
Done


MODIFY THE SCRIPT
You can edit the time you have by changing:
Code Snippet
Plaintext
    level.arsenalWaitTime = 60;
If you only want to give them one gun back you can change the following from 2 to 1:
Code Snippet
Plaintext
numberOfGuns = 2;


I will be updating this script. I just posted the first working copy for now. Please inform me of any bugs so i can fix those as I smooth out the code. This was inspired by my
Weapon Trader script (http://ugx-mods.com/forum/index.php?topic=4119.msg45419#msg45419), so I just copied and pasted a large chunk.
Title: Re: Arsenal, your weapons drop when you die
Post by: Dust on October 02, 2014, 04:48:43 am
Wow! I havent even fully tested out the weapon trader script yet. This sounds like a good idea though, will definitely test it out(if I ever have time to that is)  :lol:
Title: Re: Arsenal, your weapons drop when you die
Post by: FATKIDSLOV3CAK3 on October 02, 2014, 10:45:24 am
another great idea there man. keep it up :D
Title: Re: Arsenal, your weapons drop when you die
Post by: zsftw115 on October 02, 2014, 11:56:56 am
Wouldn't this just be another way to get two wonder weapons? :poker: i.e. 2 DG-2's, 2 Tguns etc. Good idea though. Very creative. :)
Title: Re: Arsenal, your weapons drop when you die
Post by: MakeCents on October 02, 2014, 12:17:14 pm
Wow! I havent even fully tested out the weapon trader script yet. This sounds like a good idea though, will definitely test it out(if I ever have time to that is)  :lol:

Thanks for testing it. I will be updating it like this one where you can switch out the same weapon, in case one has more ammo than the other.

another great idea there man. keep it up :D

Thanks man.

Wouldn't this just be another way to get two wonder weapons? :poker: i.e. 2 DG-2's, 2 Tguns etc. Good idea though. Very creative. :)

You can't get two of the same gun, but you could get one upgraded and one not upgraded. If people think that is a bad idea, I don't think it would be hard to adjust it so you can't. I just didn't think it was a real concern. I'll add something in the first update that checks for that based on a variable you can set to decide if you want it to be possible or not.
Title: Re: Arsenal, your weapons drop when you die
Post by: DeletedUser on October 02, 2014, 03:20:13 pm
Wouldn't this just be another way to get two wonder weapons? :poker: i.e. 2 DG-2's, 2 Tguns etc. Good idea though. Very creative. :)
Game doesn't let you have 2 same guns.
Title: Re: Arsenal, your weapons drop when you die
Post by: HitmanVere on October 02, 2014, 03:22:15 pm
Game doesn't let you have 2 same guns.

Non-upgraded and upgraded one can be at same time
Title: Re: Arsenal, your weapons drop when you die
Post by: DeletedUser on October 02, 2014, 03:28:28 pm
Non-upgraded and upgraded one can be at same time
because these are different guns
Title: Re: Arsenal, your weapons drop when you die (updated 11-30-14)
Post by: MakeCents on November 30, 2014, 08:40:57 pm
For anyone who has dl'd this, there is definitely another issue. One that may be crashing the game in coop. Please don't use it until further testing it complete. I have updated a version 1.2 that solves the current game crashing issue I think.

If anyone will be willing to test it out more intensely I would greatly appreciate it. The issue seemed to happen if the players did not spawn back in time, since they only have 60 seconds, and then when they did spawn in, it crashed the game. Removing it seemed to work, and making this 1.2 change seemed to work too. But any other glitches would be helpful as well.
Title: Re: Arsenal, your weapons drop when you die (updated 11-30-14)
Post by: MakeCents on December 03, 2014, 03:06:43 pm
Forgot to attach the file,  :facepalm:

Any testers?
Title: Re: Arsenal, your weapons drop when you die (updated 11-30-14)
Post by: rustyandme on January 25, 2015, 12:40:51 am
Looks really good. This should be implemented into more maps.