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

Zombie Counter, with menu, not hud

broken avatar :(
Created 9 years ago
by MakeCents
0 Members and 1 Guest are viewing this topic.
6,321 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
This tut helps you create a zombie counter via menu file, so it doesn't use any hud elements. It uses your hud.menu file to make the zombie counter, three added lines to your _zombiemode_spawner.gsc, and add one line to your mod.csv (if needed). If you are using dogs, instructions are at the bottom for that.



Instructions for the simple version:


 1. In hud.menu, in root/raw/ui, find "competitivemodescores", and add this to that menuDef

Code Snippet
Plaintext
	itemDef
{
name "zombiecounter"
rect 100 70 0 0 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
textscale .5
textstyle ITEM_TEXTSTYLE_SHADOWED
textfont UI_FONT_OBJECTIVE
textalign ITEM_ALIGN_CENTER
forecolor 1 0 0 1
exp text ("Zombies Left: " + dvarInt("zombie_counter"))
visible when (dvarInt("zombie_counter") > 0);
decoration
}
Help if needed:
Spoiler: click to open...
   
menuDef
{
   name         "competitivemodescores"
   rect         -103 -71 0 0 HORIZONTAL_ALIGN_RIGHT VERTICAL_ALIGN_BOTTOM
   fullScreen      0
   visible when    ( !ui_active() && dvarint( ui_hud_hardcore ) == 0 && dvarBool( miniscoreboardhide ) == 0 && dvarBool( hud_missionFailed ) == 0 && dvarint( arcademode ) == 1 || dvarint( zombiemode ) == 1 );
   
   itemDef
   {
      name         "playerscores"
      rect         0 0 100 0
      ownerdraw      CG_COMPETITIVE_MODE_SCORES
      visible         1
   }   
   itemDef
   {
      name "zombiecounter"
      rect         100 70 0 0 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
      textscale      .5
      textstyle      ITEM_TEXTSTYLE_SHADOWED
      textfont      UI_FONT_OBJECTIVE
      textalign      ITEM_ALIGN_CENTER
      forecolor      1 0 0 1
      exp text      ("Zombies Left: " + dvarInt("zombie_counter"))
      visible   when    (dvarInt("zombie_counter") > 0);
      decoration
   }   
}   
(If you like, you can change visible   when    (dvarInt("zombie_counter") > 0); to visible 1 to always see the counter)

 2. In root/raw/_zombiemode_spawner.gsc, or in your root/mods/mapname/maps/_zombiemode_spawner.gsc, find:
Code Snippet
Plaintext
init()
{
3. Change it to this:
Code Snippet
Plaintext
init()
{
SetDvar("zombie_counter", level.zombie_total + get_enemy_count());
4. then find this:
Code Snippet
Plaintext
zombie_death_event( zombie )
{
zombie waittill( "death" );
5. and change it to this:
Code Snippet
Plaintext
zombie_death_event( zombie )
{
if(GetDvarInt("zombie_counter") <= 0) SetDvar("zombie_counter", (level.zombie_total + get_enemy_count())-1);
zombie waittill( "death" );
SetDvar("zombie_counter", level.zombie_total + get_enemy_count());

 6. Add this to your mod.csv, if you don't have it already here or in another csv:
Code Snippet
Plaintext
menufile,ui/hud.menu

 7. Build mod.


Count Dogs

If you want to count dogs too:
 1.  Open _zombiemode_dogs.gsc, in root/raw/maps, or in root/mods/mapname/ and find:
Code Snippet
Plaintext
dog_death()
{
self waittill( "death" );
2. change it to this:
Code Snippet
Plaintext
dog_death()
{
if(GetDvarInt("zombie_counter") <= 0) SetDvar("zombie_counter", (level.zombie_total + get_enemy_count())-1);
self waittill( "death" );
SetDvar("zombie_counter", level.zombie_total + get_enemy_count());


Last Edit: August 05, 2016, 06:21:34 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: usNUKETOWN
Date Registered: 19 February 2014
Last active: 7 years ago
Posts
177
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Zombie Specialist
Signature
×
thezombieproject's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Oil Rig Beta Access
Oil Rig Beta Access
great work again man, ill be using this on Atlas Labs!
broken avatar :(
×
broken avatar :(
Location: england
Date Registered: 7 December 2018
Last active: 4 years ago
Posts
2
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
×
Yehboi's Groups
Yehboi's Contact & Social Links
didn't work for me. when i build mod, in notepad it says "the file has been modified...blah blah reload" then the /meufile,ui/hudd.menu is removed


broken avatar :(
×
broken avatar :(
Location: england
Date Registered: 7 December 2018
Last active: 4 years ago
Posts
2
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
×
Yehboi's Groups
Yehboi's Contact & Social Links
i fixed it but now no zombies spawn... lol i give up

 
Loading ...