Skip to content
  • 0 Unread 0
  • Recent
  • Popular
  • Users
  • Donate
Collapse
Home Docs Stats Discord Donate
Download
La_Ferrari2013

La_Ferrari2013

@La_Ferrari2013
Unfollow Follow
About
Posts
4
Topics
2
Shares
0
Groups
0
Followers
10
Following
9

Posts

Recent Best Controversial

  • Randomised Map Rotation In Custom Games
    La_Ferrari2013 La_Ferrari2013
    BO2 Modding Support & Discussion

    Yes please, how would it improve it, would it be more efficient or consistent.


  • Randomised Map Rotation In Custom Games
    La_Ferrari2013 La_Ferrari2013
    BO2 Modding Support & Discussion

    For anyone wondering, here was the code that ended up working in the end. To go in the scripts folder.

    #include maps\mp_utility;
    #include maps\mp\gametypes_hud_util;

    main()
    {
    level thread bot_lobby_monitor();
    }

    bot_lobby_monitor()
    {
    level waittill("prematch_over");

    score_limit = getDvarInt("scr_war_scorelimit"); 
    time_limit = getDvarInt("scr_war_timelimit");   
    
    if(score_limit <= 0) 
    {
        score_limit = 75; 
    }
    if(time_limit <= 0) 
    {
        time_limit = 10; 
    }
    
    time_limit_seconds = time_limit * 60;
    elapsed_seconds = 0;
    
    while(1)
    {
        // Check Score Conditions
        if (isDefined(game["teamScores"]["allies"]) && game["teamScores"]["allies"] >= score_limit)
        {
            wait 5; 
            force_next_random_map();
            break;
        }
        
        if (isDefined(game["teamScores"]["axis"]) && game["teamScores"]["axis"] >= score_limit)
        {
            wait 5; 
            force_next_random_map();
            break;
        }
    
        // Check Time Conditions
        if (elapsed_seconds >= time_limit_seconds)
        {
            wait 5;
            force_next_random_map();
            break;
        }
    
        // Handle Natural or Manual Break Ends
        if(isDefined(level.gameEnded) && level.gameEnded)
        {
            if(isDefined(level.forcedEnd) && level.forcedEnd)
            {
                return; 
            }
            wait 5;
            force_next_random_map();
            break;
        }
    
        wait 0.5; 
        elapsed_seconds += 0.5;
    }
    

    }

    force_next_random_map()
    {
    // FIX: Manually starting the index at 0 so the array initializes perfectly
    maps[0] = "mp_carrier";
    maps[maps.size] = "mp_cargo";
    maps[maps.size] = "mp_drone";
    maps[maps.size] = "mp_express";
    maps[maps.size] = "mp_hijacked";
    maps[maps.size] = "mp_meltdown";
    maps[maps.size] = "mp_nuketown_2020";
    maps[maps.size] = "mp_overflow";
    maps[maps.size] = "mp_plaza";
    maps[maps.size] = "mp_raid";
    maps[maps.size] = "mp_slums";
    maps[maps.size] = "mp_standoff";
    maps[maps.size] = "mp_turbine";
    maps[maps.size] = "mp_yemen";

    // DLC 1
    maps[maps.size] = "mp_downhill";   
    maps[maps.size] = "mp_mirage";     
    maps[maps.size] = "mp_hydro";      
    maps[maps.size] = "mp_skate";      
    
    // DLC 2
    maps[maps.size] = "mp_concert";    
    maps[maps.size] = "mp_magma";      
    maps[maps.size] = "mp_studio";     
    maps[maps.size] = "mp_vertigo";    
    
    // DLC 3
    maps[maps.size] = "mp_uplink";     
    maps[maps.size] = "mp_bridge";     
    maps[maps.size] = "mp_castaway";   
    maps[maps.size] = "mp_paintball";  
    
    // DLC 4
    maps[maps.size] = "mp_dig";        
    maps[maps.size] = "mp_frostbite";  
    maps[maps.size] = "mp_pod";        
    maps[maps.size] = "mp_takeoff";    
    
    random_map = maps[ randomInt( maps.size ) ];
    
    // Change the global rotation variable so the game picks it up when transitioning
    setDvar("g_gametype", "war"); 
    setDvar("sv_mapRotation", "gametype war map " + random_map);
    setDvar("sv_mapRotationCurrent", "gametype war map " + random_map);
    
    // Override the UI lobby pointers directly
    setDvar("ui_mapname", random_map);
    setDvar("mapname", random_map);
    
    // Command the engine to progress immediately to the rotation we just established
    exitLevel( false );
    

    }


  • Randomised Map Rotation In Custom Games
    La_Ferrari2013 La_Ferrari2013
    BO2 Modding Support & Discussion

    I want to run a custom games match, not a local server with bots and a randomised map rotation, not vote, randomised. How do I do this, or is it even possible. Thanks


  • Game crashing when joining a round
    La_Ferrari2013 La_Ferrari2013
    BO2 Client Support

    48c9d471-a187-4f64-a3d6-380e35eba249-image.png

    The game has this error message and crashes when I try to join a multiplayer game, how can I fix this?

  • Login

  • Don't have an account? Register

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