Adjust Scavenger to Emulate MW2 with GSC?
-
Hi there,
Two years ago I used a GSC script (credit mostly to Resxt) to remove spawn protection and the visual effects of the MOAB for playing against bots.
For some reason I don't understand, a side-effect of running this script was that Scavenger behaved as it did in MW2, and resupplied secondary weapons, lethals, and tacticals with each pickup. I haven't changed this script at all, but when running the game now, two years later, on an updated version of Plutonium, Scavenger works as it did in MW3, resupplying only the primary weapon.
As a Javelin addict on MW2 who much preferred Scavenger's ability to resupply it, is there any way to restore this behavior with a GSC script? I did a search of the forums and found nothing. I've attached the script, which shouldn't have had any effect but somehow did.
Thanks for the help.
#include maps\mp\_utility; #include maps\mp\killstreaks\_nuke; Init() { level.killstreakSpawnShield = 0; } main() { replacefunc(maps\mp\killstreaks\_nuke::nukeVision, ::disableNukeVision); replacefunc(maps\mp\killstreaks\_nuke::nukeEffects, ::disableNukeEffects); } disableNukeVision() { } disableNukeEffects() { level endon( "nuke_cancelled" ); setdvar( "ui_bomb_timer", 0 ); foreach ( var_1 in level.players ) { var_2 = anglestoforward( var_1.angles ); var_2 = ( var_2[0], var_2[1], 0 ); var_2 = vectornormalize( var_2 ); var_3 = 5000; var_4 = spawn( "script_model", var_1.origin + var_2 * var_3 ); var_4 setmodel( "tag_origin" ); var_4.angles = ( 0, var_1.angles[1] + 180, 90 ); var_4 thread nukeEffect( var_1 ); } }
-
-
Try this in the Init function
level.scavenger_altmode = 1; level.scavenger_secondary = 1;
If it doesn't work then monitoring the scavenger pickup and filling up the secondary's ammo might do the trick
https://github.com/plutoniummod/iw5-scripts/blob/42f3db22261febd7180075842e250d2e0f3d0507/maps/mp/gametypes/_missions.gsc#L116 -
Tifosi 92wrote on Nov 5, 2024, 4:17 AM last edited by Tifosi 92 Nov 5, 2024, 6:18 AM
Resxt said in Adjust Scavenger to Emulate MW2 with GSC?:
Try this in the Init function
Thanks for the suggestion (and for moving the thread to the right forum; sorry about that). I tried adding that to the init function, but no luck. I also tried changing the "perk_scavengerMode" variable from 0 to 1 in the console but noticed no change. I'm not quite sure how to do what you're suggesting so I suppose I'll deal with it as is until someone with more coding experience than me decides to come up with a fix, haha.
It would also resupply lethals and tacticals before, too. Really weird, because I know for certain I didn't have the expertise to write the code to do this, nor did I write a script for it, so it must have changed something else in the engine back then...
-
Tifosi 92 (Maybe it's late to reply this but I'll do it) I made a script to have the lethal and tactical grenades being ressuplied in MW3, so here is the script, it even ressuplies the launchers weapons in case you want it too.
#include maps\mp\_utility; Init() { InitScavengerResupply(); } InitScavengerResupply() { level thread OnPlayerConnect(); } OnPlayerConnect() { for(;;) { level waittill("connected", player); player thread OnPlayerSpawned(); } } OnPlayerSpawned() { self endon("disconnect"); for(;;) { self waittill("changed_kit"); // Check if the player has the Scavenger perk if (self HasPerk("specialty_scavenger")) { self thread OnScavengerPickup(); } } } OnScavengerPickup() { self endon("disconnect"); self endon("death"); for (;;) { self waittill("scavenger_pickup"); self GiveMaxAmmo(); if (self HasWeapon(self GetCurrentOffhand())) { self GiveMaxAmmo(self GetCurrentOffhand()); } if (self GetWeaponAmmoStock("frag_grenade_mp") < 1) { self SetWeaponAmmoStock("frag_grenade_mp", 1); } if (self GetWeaponAmmoStock("semtex_mp") < 1) { self SetWeaponAmmoStock("semtex_mp", 1); } if (self GetWeaponAmmoStock("throwingknife_mp") < 1) { self SetWeaponAmmoStock("throwingknife_mp", 1); } if (self GetWeaponAmmoStock("bouncingbetty_mp") < 1) { self SetWeaponAmmoStock("bouncingbetty_mp", 1); } if (self GetWeaponAmmoStock("claymore_mp") < 1) { self SetWeaponAmmoStock("claymore_mp", 1); } if (self GetWeaponAmmoStock("c4_mp") < 1) { self SetWeaponAmmoStock("c4_mp", 1); } if (self GetWeaponAmmoStock("flash_grenade_mp") < 1) { self SetWeaponAmmoStock("flash_grenade_mp", 1); } if (self GetWeaponAmmoStock("concussion_grenade_mp") < 1) { self SetWeaponAmmoStock("concussion_grenade_mp", 1); } if (self GetWeaponAmmoStock("scrambler_mp") < 1) { self SetWeaponAmmoStock("scrambler_mp", 1); } if (self GetWeaponAmmoStock("emp_grenade_mp") < 1) { self SetWeaponAmmoStock("emp_grenade_mp", 1); } if (self GetWeaponAmmoStock("smoke_grenade_mp") < 1) { self SetWeaponAmmoStock("smoke_grenade_mp", 1); } if (self GetWeaponAmmoStock("trophy_mp") < 1) { self SetWeaponAmmoStock("trophy_mp", 1); } if (self GetWeaponAmmoStock("portable_radar_mp") < 1) { self SetWeaponAmmoStock("portable_radar_mp", 1); } self thread ResupplyLaunchers(); } } ResupplyLaunchers() { launchers = [ "m320_mp", "rpg_mp", "iw5_smaw_mp", "stinger_mp", "xm25_mp", "javelin_mp" ]; for (i = 0; i < launchers.size; i++) { weapon = launchers[i]; if (self HasWeapon(weapon)) { self GiveMaxAmmo(weapon); } } }