Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: hubigygjjik
Hey!! Well, I've been doing a custom Easter Egg that when you press "F" in 3 specific paintings, a door opens with this code:
function PrincipalEEinit()
{
door_trig = GetEnt("doorEE", "targetname");
door_trig SetHintString("This door is opened somewhere else");
door_trig SetCursorHint("HINT_NOICON");
level.opendoor = 0;
level.dooropened = 3;
thread onpainting1();
thread onpainting2();
thread onpainting3();
}
function onpainting1()
{
painting1 = GetEnt("1stpainting", "targetname");
painting1 SetHintString(" ");
painting1 SetCursorHint("HINT_NOICON");
painting1 waittill("trigger", player);
model1 = GetEnt("1rstmodel", "targetname");
model1 delete();
level.opendoor++;
thread finishedEE();
painting1 delete();
}
function onpainting2()
{
painting2 = GetEnt("2ndpainting", "targetname");
painting2 SetHintString(" ");
painting2 SetCursorHint("HINT_NOICON");
painting2 waittill("trigger", player);
model2 = GetEnt("2ndmodel", "targetname");
model2 delete();
level.opendoor++;
painting2 delete();
}
function onpainting3()
{
painting3 = GetEnt("3rdpainting", "targetname");
painting3 waittill("trigger", player);
painting3 SetHintString(" ");
painting3 SetCursorHint("HINT_NOICON");
model3 = GetEnt("3rdmodel", "targetname");
model3 delete();
level.opendoor++;
thread FinishedEE();
painting3 delete();
}
function FinishedEE()
{
if(level.opendoor == 3)
{
eedoor = GetEntArray("easter_egg_door","targetname");
for(i=0;i<eedoor.size;i++) {="" eedoor="" [i]="" delete();="" }="" }=""></eedoor.size;i++)>
zm_zonemgr::add_adjacent_zone("start_zone", "zone_1", "enter_zone_1");
zm_zonemgr::add_adjacent_zone("zone_1", "zone_2", "enter_zone_2");
zm_zonemgr::add_adjacent_zone("zone_1", "zone_3", "enter_zone_3");
zm_zonemgr::add_adjacent_zone("zone_1", "zone_4", "enter_zone_4");
zm_zonemgr::add_adjacent_zone("zone_1", "zone_5", "enter_zone_5");
zm_zonemgr::add_adjacent_zone("zone_4", "zone_5", "enter_zone_5");
zm_zonemgr::add_adjacent_zone("zone_4", "zone_6", "enter_zone_6");
zm_zonemgr::add_adjacent_zone("zone_1", "zone_7", "enter_zone_7");
zm_zonemgr::add_adjacent_zone("zone_6", "zone_5", "enter_zone_5");
zm_zonemgr::add_adjacent_zone("zone_6", "zone_8", "enter_zone_8");
zm_zonemgr::add_adjacent_zone("zone_7", "zone_10", "enter_zone_10");
zm_zonemgr::add_adjacent_zone("zone_5", "zone_12", "enter_zone_12");
zm_zonemgr::add_adjacent_zone("zone_12", "zone_13", "enter_zone_13");
pd: sorry for putting this in the radiant section.
ModmeBot:
Reply By: mathfag
put this in finishedee
level flag::init( "enter_zone_13" );
level flag::set( "enter_zone_13" );
also you need
eedoor[i] ConnectPaths();
or the zombies wont walk through it
ModmeBot:
Reply By: Harry Bo21
dont need the init, its initd by the code setting up the adjacent zone