Modme Forums

Barrier Defense System Tutorial

Game Modding | Call of Duty: Black Ops 3 | Scripting


Sleepy216:

This is a tutorial on how to install my barrier defense system. I got the idea from the old ZCT mod from waw.
The trigger based activation lasts for one minute by default and the cooldown is 5 minutes.
Upon buying the trigger, all the zombies will be killed off and the barriers will be activated.

I also included a powerup if you would like to install it. The powerup lasts for 30 seconds by default and does not kill the zombies beforehand. That can easily be added if you like.
The effect used is one sided, so you will have to edit it if you need a double sided one. you could do 2 structs front to back, but I wouldn't do it.
There are 2 included fx that I "made". I'm fairly certain I used stock fx to make them, if I did not, I will quickly update the DL with the needed materials when people say it isn't working haha.

If you would like a visual tutorial:


This is literally the install instructions from the DL, so feel free to just use the .txt file included.

////////////////////////////////////
INSTALLING FILES
////////////////////////////////////

Open the bo3_root folder.

Drag all contents into your Call of Duty Black Ops III folder

Open the your_map_root folder.

Drag contents into your maps root folder, located in usermaps
Example file path: Call of Duty Black Ops III\usermaps\zm_yourmap

The file adding is now finished!

////////////////////////////////////
INSTALLING SCRIPTS
////////////////////////////////////

NOTICE:
YOU DO NOT HAVE TO INSTALL THE POWERUP TO USE THE TRIGGER BARRIER SYSTEM.
I HAVE ADDED A SECOND FX IN CASE PEOPLE DON'T LIKE THE ORIGINAL, JUST UNCOMMENT THE FX IN THE ZONE FILE AND OPEN BG.GSC.
THERE WILL BE A COMMENTED OUT LINE THAT TELLS YOU WHAT TO CHANGE NEAR THE TOP OF THE GSC.

-----------------
ADD THE LINE:

#using scripts\zm\zm_powerup_bds;    //SKIP IF YOU DONT WANT THE POWERUP

to the top of zm_yourmapname.csc

------------------
ADD THE LINES:
#using scripts\zm\zm_powerup_bds;    //SKIP IF YOU DONT WANT THE POWERUP

#using scripts\zm\zm_bd;

to the top of zm_yourmapname.gsc

-----------------
ADD THE LINE:

zm_bd::main();

to the bottom of your main() function in zm_yourmapname.gsc

------------------
ADD THE LINES:
scriptparsetree,scripts/zm/zm_powerup_bds.gsc    //SKIP IF YOU DONT WANT THE POWERUP

scriptparsetree,scripts/zm/zm_powerup_bds.csc    //SKIP IF YOU DONT WANT THE POWERUP

scriptparsetree,scripts/zm/zm_bd.gsc

fx,custom/barrier_defense_lg.efx

//fx,custom/barrier_defense_lg_00.efx     //remove the "//" from the front of this line to use the other fx

material,specialty_bd_system

xmodel,p7_toolbox_handheld_small_red

to zm_yourmapname.zone file


/////NOTICE/////
You are able to activate the barriers from any function by adding this:

thread zm_bd::start_the_barrier(your_time_here);    //replace your_time_here with any time or you can use the normal time with level.bd_time

you will also need to add:
#using scripts\zm\zm_bd;

to the top of any script that you add the barrier activation to.

////////////////////////////////////
RADIANT SETUP
////////////////////////////////////

Open the prefab browser.
Open the bds folder.
Add the bd_trigger prefab to your map. The script is set up to allow as many buyable locations as you desire.
Next add the bd_shield prefab over every window and doorway you want them. You may use as many as you like.
Make sure the arrow of the struct is facing the direction you want the fx to play.
You can "stamp" the prefab if you would like to resize any of the triggers.


Feel free to edit the script as you feel fit.
I have added some small explanations for what variables control what.
Please credit me, Sleepy Taylor, if you use this in your map.

DOWNLOAD LINK:
Mega Link