UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Rampage_619

Zombie Counter for BO3 Custom maps






Go to Root>usermaps>zm_yourmapname(open the folder corresponding with your map)

Open zm_yourmapname.gsc

Find the following function
Code Snippet
Plaintext
function main()

add the following line inside
Code Snippet
Plaintext
zombiesleft_hud();

so it should look like this
Code Snippet
Plaintext
function main()
{
zm_usermap::main();

level._zombie_custom_add_weapons =&custom_add_weapons;

//Setup the levels Zombie Zone Volumes
level.zones = [];
level.zone_manager_init_func =&usermap_test_zone_init;
init_zones[0] = "start_zone";
level thread zm_zonemgr::manage_zones( init_zones );
//Zombie Counter
zombiesleft_hud();


// Added to allow On spawned functionality
callback::on_spawned( &on_player_spawned );

// Change this to TRUE if you would like the Weapon Box to spawn in a random location other than _start

level.random_pandora_box_start = false;


}

Now go to the bottom of the file and copy and paste the following code

Code Snippet
Plaintext
// Zombie Counter 1.0
function zombiesleft_hud()
{   
//Rampage_619: Beta 1.0
//Rampage_619: play with the x value to move the hud left and right
// Rampage_619: increase the " Remaining.x" if the numbers start to overlay
// Rampage_619: play with the Y value to push the hud up and down

Remaining = create_simple_hud();
  Remaining.horzAlign = "center";
  Remaining.vertAlign = "middle";
    Remaining.alignX = "middle";
    Remaining.alignY = "middle";
    Remaining.y = 230;
    Remaining.x = 5;
    Remaining.foreground = 1;
    Remaining.fontscale = 2.0;
    Remaining.alpha = 1;
    Remaining.color = ( 0.423, 0.004, 0 );


    ZombiesLeft = create_simple_hud();
    ZombiesLeft.horzAlign = "center";
    ZombiesLeft.vertAlign = "middle";
    ZombiesLeft.alignX = "right";
    ZombiesLeft.alignY = "middle";
    ZombiesLeft.y = 230;
    ZombiesLeft.x = -1;
    ZombiesLeft.foreground = 1;
    ZombiesLeft.fontscale = 2.0;
    ZombiesLeft.alpha = 1;
    ZombiesLeft.color = ( 0.423, 0.004, 0 );
    ZombiesLeft SetText("Zombies Left: ");


while(1)
{
//level.zombie_total = get_zombie_count_for_round( level.round_number, level.players.size );
//zw_total = zombie_utility::get_current_actor_count();
remainingZw = get_zw_count();
//= zw_total;
Remaining SetValue(remainingZw);

if(remainingZw ==  0 )
{
Remaining.alpha = 0;
ZombiesLeft.alpha = 0;
while(1)
{
remainingZw = get_zw_count();
//= zw_total;
Remaining SetValue(remainingZw);

if(remainingZw != 0  )
{
Remaining.alpha = 1;
ZombiesLeft.alpha = 1;                     
break;
}
wait 0.05;
}
}
wait 0.5;
}
}

function get_zw_count()
{
enemies = [];
level.current_zw_array = [];
enemies = GetAiSpeciesArray( level.zombie_team, "all" );

for( i = 0; i < enemies.size; i++ )
{
if ( IS_TRUE( enemies[i].ignore_enemy_count ) )
{
continue;
}
ARRAY_ADD( level.current_zw_array, enemies[i] );
}

level.current_zw_count = level.current_zw_array.size;

return level.current_zw_count;
}
function create_simple_hud( client, team )
{
if ( IsDefined( team ) )
{
hud = NewTeamHudElem( team );
hud.team = team;
}
else
{
if( IsDefined( client ) )
{
hud = NewClientHudElem( client );
}
else
{
hud = NewHudElem();
}
}

level.hudelem_count++;

hud.foreground = true;
hud.sort = 1;
hud.hidewheninmenu = false;

return hud;
}

Use launcher to select your map and only check the link option and build.

Will be updating this with more color tuts and different designs.

Post comments if any issue persists.

8 years ago
I was looking for a tut found couple didnt work for me so i made one that wokred for me.

the following steps worked for me you can try it if your box isn't moving and keep re-spawning in the same spot

Lets get started

Radiant Setup

Open up radiant and place the chests as according from start_chest being the starting box and so on untill chest 6,
 you will notice chest 5 is missing, dont worry about the chest 5
YOU CAN DOWNLOAD THE PREFABS FROM THE END OF THIS POST

[info]Make sure you add all the Chests[/info]

Scripting

for most people the gsc is not fixed to make the box move.

open your MAP_Name_HERE.gsc and find the box code which looks like this

Code Snippet
Plaintext
// Magic Boxes -- The Script_Noteworthy Value Names On Purchase Trigger In Radiant
boxArray = [];
boxArray[ boxArray.size ] = "start_chest";
boxArray[ boxArray.size ] = "chest1";
boxArray[ boxArray.size ] = "chest2";
boxArray[ boxArray.size ] = "chest3";
boxArray[ boxArray.size ] = "chest4";
level.DLC3.PandoraBoxes = boxArray;

add this line to the code
Code Snippet
Plaintext
BoxArray[ boxArray.size] = "chest5";

so the code will look like this
Code Snippet
Plaintext
// Magic Boxes -- The Script_Noteworthy Value Names On Purchase Trigger In Radiant
boxArray = [];
boxArray[ boxArray.size ] = "start_chest";
boxArray[ boxArray.size ] = "chest1";
boxArray[ boxArray.size ] = "chest2";
boxArray[ boxArray.size ] = "chest3";
boxArray[ boxArray.size ] = "chest4";
boxArray[ boxArray.size ] = "chest5";
level.DLC3.PandoraBoxes = boxArray;

now you are all setup save the file and save your map.
[okay]Run around looking for the box before you run out of ammo![/okay]

Credits:
Rampage_619

13 years ago
if you were having trouble with your zombies not rising out of ground try this fix.

Open the gsc file _zombiemode_spawners

find the codeblock
Code Snippet
Plaintext
if( ( level.script == "nazi_zombie_sumpf" || level.script == "nazi_zombie_factory") && 
IsDefined( level.zombie_rise_spawners ) )
{
spots = level.zombie_rise_spawners;
}
else
{
spots = GetStructArray("zombie_rise", "targetname");
}

if( spots.size < 1 )
{
self unlink();
self.anchor delete();
return;
}
else
spot = random(spots);

replace with
Code Snippet
Plaintext
if ( IsDefined( level.zombie_rise_spawners ) )
{
spots = level.zombie_rise_spawners;
}
else
{
spots = GetStructArray("spawners_rise", "targetname");
}

if( spots.size < 1 )
{
self unlink();
self.anchor delete();
return;
}
else
spot = random(spots);

the kvp for the struct is
Code Snippet
Plaintext
"zone_name_spawners_rise", "targetname"

Credit:
=ZCT= Wo0
Rampage_619
13 years ago
Results May Vary

Download the linked file and open it using Winrar and follow the steps.

Updated Link
http://www.mediafire.com/?ceq2o98mejc6owo

Radiant Setup

Set up all the perk machines as usual. make sure the perk machines are in front of a door so that when a player opens the door the perk machine effects will be really cool to watch.

create a script_origin and give it these kvp's
Code Snippet
Plaintext
"script_noteworthy","corner1_randomVendingLoc

place this script right under the machine. ( doesnt really mater which machine )
get the door which is infront of the origin "corner1_randomVendingLoc"

select the trigger on the door and give it this kvp's
Code Snippet
Plaintext
"zw_corner1_door","script_noteworthy"

do the same step for 3 other doors and script origins.

For Machine 2
Code Snippet
Plaintext
"script_noteworthy","corner2_randomVendingLoc
Code Snippet
Plaintext
"zw_corner2_door","script_noteworthy"

For Machine3
Code Snippet
Plaintext
"script_noteworthy","corner3_randomVendingLoc
Code Snippet
Plaintext
"zw_corner3_door","script_noteworthy"

For Machine 4
Code Snippet
Plaintext
"script_noteworthy","corner4_randomVendingLoc
Code Snippet
Plaintext
"zw_corner4_door","script_noteworthy"

Models for the machines must be changed too. select the perk machine model and change the kvp's of model to the respective machine
Code Snippet
Plaintext
      "zombie_vending_jugg_on_price"     
        "zombie_vending_doubletap_price"
        "zombie_vending_revive_on_price"   
        "zombie_vending_sleight_on_price"

thats it for the radiant set up.

Scripting Setup
place the 3 files from the download in your mods folder.

open your mapname.gsc file and add this line before maps\_zombiemode::main
Code Snippet
Plaintext
maps\zw_rando_zone::main();

so the code looks like this
Code Snippet
Plaintext
 maps\zw_rando_zone::main();
maps\_zombiemode::main();

add these lines to your mapname.csv
Code Snippet
Plaintext
xmodel,zombie_vending_jugg_on_price
xmodel,zombie_vending_doubletap_price
xmodel,zombie_vending_revive_on_price
xmodel,zombie_monkey_bomber
xmodel,zombie_vending_sleight_on_price
fx,misc/fx_zombie_perk_lottery_4
fx,misc/fx_zombie_perk_lottery
fx,misc/fx_zombie_perk_lottery_flash
fx,misc/fx_zombie_perk_lottery_end
rawfile,maps/zw_randomperks.gsc
rawfile,maps/zw_rando_zone.gsc

i have added  a copy of  _zombiemode_perks.gsc. find these lines in this file and comment it
Code Snippet
Plaintext
level thread turn_jugger_on();
level thread turn_doubletap_on();
level thread turn_sleight_on();
level thread turn_revive_on();

comment it like this
Code Snippet
Plaintext
//level thread turn_jugger_on();
//level thread turn_doubletap_on();
//level thread turn_sleight_on();
//level thread turn_revive_on();

Note:
the angles of the machine is take from the original script_origin , so place all the script_origin in the same angles, or you will be having trouble with machines which has a different angles.
Edit the roof on top of the machines so that when taller machines are spawned, they don't intersect with roof.

Video:
http://www.xfire.com/video/4be89f/

if any problem, post it here, ill be updating this thread frequently with fixes.

Credit: Rampage_619
13 years ago
Loading ...