Modme Forums

My Scripts Pool

Game Asset Reversing | Releases


IceGrenade:

I am building a repo on GitHub of all my scripts. I still have about 200 code snippets to add

https://github.com/IceGrenade/bo3/tree/master/scripts

All sorts of handy things to add features to your maps. Let me know if there is anything from my existing maps that you want to see in there and I will add it in, or if you have any questions about it :)

Eg. Autozones to activate zones invisibly to make advanced zoned areas without doors

/*
/*
    Description
    When users walk into certain trigger multiples you can enable zones to open,
    allowing you to remove doors from areas to make zoning more fluid

    Important - To use this script you must provide credit to the Authors on your Workshop page of the map you use this in
    Authors: IceGrenade

    Difficulty to Implement = 3 (This code snippet is not for beginners, some prior knowledge is assumed)[0=Easy-10=Advanced]

    Instructions
    Add trigger_multiple triggers into your map with
    targetname = "auto_zone"
    script_string = the zone flag you wish to activate
*/

//Example Zone Flag Setup - Add your custom adjacent_zone lines to this existing function
function usermap_test_zone_init()
{
    zm_zonemgr::add_adjacent_zone("start_zone", "zone2", "zone2flag");
    zm_zonemgr::add_adjacent_zone("zone2",      "zone3", "zone3flag");
    level flag::init( "always_on" );
    level flag::set( "always_on" );
}    

//Place this at the bottom of your Main() function before the closing bracket }
thread icegrenade_automatic_zones();

//Place this at the bottom of your mapname.gsc
function icegrenade_automatic_zones()
{
    auto_zones = GetEntArray("auto_zone", "targetname");
    foreach(zone in auto_zones)
        zone auto_zone_logic();
}

function auto_zone_logic()
{
    runit waittill("trigger", player);
    level flag::set( self.script_string );
}


sharpgamers4you:

what about a script that checks for the player's name, then if it's (for example) icegranade it gives a weapon.


BobbyLee298:

sweet