Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. [ZM] [RELEASE] Running and Reloading!

[ZM] [RELEASE] Running and Reloading!

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
2 Posts 2 Posters 696 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Coronavirus-19undefined Offline
    Coronavirus-19undefined Offline
    Coronavirus-19
    wrote on last edited by Coronavirus-19
    #1

    This isn't true running and reloading, more so an illusion. In Black Ops 2, running and reloading at the same time isn’t actually a scriptable feature — it’s hard-locked by the game engine itself.

    Why true “run + reload” isn’t possible in BO2 (and why this is a workaround)

    When you reload:
    • The engine forces the player out of sprint
    • Sprint is only allowed while moving forward
    • Reload animations temporarily override movement logic
    • Scripts do not receive early reload input events
    Because of this, there’s no exposed function in GSC to:
    • Detect the reload button press early
    • Override sprint restrictions
    • Allow sprinting during reload
    • Change movement state mid-animation
    Those checks happen below the scripting layer, inside the player movement code (pm_* functions), which GSC can’t modify.
    ═══════════════════════════════════════════

    So how does this script work?

    Instead of true sprint-reload, the script:
    • Detects when the engine flags the player as “reloading”
    • Temporarily boosts walk speed
    • Restores normal speed once reload finishes
    This creates the illusion of running while reloading:
    • Movement feels faster
    • No animation breaking
    • No desync
    • No crashes
    It’s the closest possible result without engine hooks or custom DLLs.

    Download Link | Video Link

    Path: Win + R "%localappdata%"

    • Plutonium/storage/t6/scripts/zm

    Raw Code:

    #include maps\mp\_utility;
    
    init()
    {
        level thread onPlayerConnect();
    }
    
    onPlayerConnect()
    {
        for ( ;; )
        {
            level waittill("connected", player);
            player thread onPlayerSpawned();
        }
    }
    
    onPlayerSpawned()
    {
        self endon("disconnect");
    
        for ( ;; )
        {
            self waittill("spawned_player");
    
            // Start reload speed monitor
            self thread reloadWalkSpeedBoost();
        }
    }
    
    reloadWalkSpeedBoost()
    {
        self endon("disconnect");
        self endon("death");
    
        normalSpeed = 1.0; // default speed is 1.0
        reloadSpeed = 1.5; // adjust if needed (1.2–1.5 safe)
    
        wasReloading = false;
    
        for (;;)
        {
            isNowReloading = self isReloading();
    
            // Detect reload START (edge detection)
            if ( isNowReloading && !wasReloading )
            {
                self setMoveSpeedScale(reloadSpeed);
            }
    
            // Detect reload END
            if ( !isNowReloading && wasReloading )
            {
                self setMoveSpeedScale(normalSpeed);
            }
    
            wasReloading = isNowReloading;
            wait 0.05;
        }
    }
    
    
    1 Reply Last reply
    2
    • Decundefined Offline
      Decundefined Offline
      Dec
      Contributor
      wrote on last edited by
      #2

      goated

      1 Reply Last reply
      1
      • Astrooleanundefined Astroolean referenced this topic
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Donate