UGX-Mods

Call of Duty: Black Ops 3 => Help Desk => Scripting => Topic started by: Dareedevokl on December 05, 2016, 11:58:52 pm

Title: Trigger to start Round 1
Post by: Dareedevokl on December 05, 2016, 11:58:52 pm
I remember seeing a script like this for WaW and I was wondering if it's possible to do such a thing with BO3's engine?
Title: Re: Trigger to start Round 1
Post by: Cxwh on December 09, 2016, 09:07:20 pm
Just wait the trigger gets triggered and then call
Code Snippet
Plaintext
function round_1()
{
zombies = GetAIArray("axis");
level.zombie_total = 0; //idk if this is needed
if(isDefined(zombies))
{
for(i = 0; i < zombies.size; i++)
{
zombies[i] dodamage(zombies[i].health + 1, (0,  0,  0), self);
wait 0.05;
}
}
level.round_number = 1;
}
Title: Re: Trigger to start Round 1
Post by: MakeCents on December 14, 2016, 01:40:41 pm
Try something like this, untested.

Code Snippet
Plaintext
#using scripts\shared\array_shared;

/*
#####################
by: M.A.K.E C E N T S
#####################
Script: delayed_start.gsc

Add to main in mapname.gsc
delaystart::init(  );

Add to top of mapname.gsc
#using scripts\zm\delayed_start;

Add to zone file
scriptparsetree,scripts/zm/delayed_start.gsc

###############################################################################
*/

#namespace delaystart;

function init()
{
thread DontStartYet();
}

function DontStartYet()
{
level flag::wait_till( "initial_blackscreen_passed" );
trigs = GetEntArray("starttrig","targetname");
array::thread_all(trigs, &WaitToStart);
array::thread_all(trigs, &CleanUpTrigs);
SetDvar("ai_DisableSpawn",1);
level waittill("gamestartedup");
SetDvar("ai_DisableSpawn",0);
}

function WaitToStart()
{
level endon("gamestartedup");
self waittill("trigger", player);
IPrintLnBold(player.playername + " started the game");
level notify("gamestartedup");
}

function CleanUpTrigs()
{
level waittill("gamestartedup");
self Delete();
}



waw modified the round_start or round_think functions and delayed the starting of the round. Once we are able overwrite those without a mod we could do that again. Something like this should work to stop the zombies from spawning until the trigger is activated. You may also be able to redirect the pointer, level._round_start_func in your zm_usermap.gsc, but I haven't tried.

Edit: fixed script with print and notify I missed.