Game Modding | Call of Duty: Black Ops 3 | Scripting
Pepergogo:
//Respawn Zombies
level thread zombie_respawn();
function zombie_respawn()
{
    trig = GetEnt("zom_clear","targetname");
    trig SetHintString("If zombies don't spawn, press ^3&&1^7 to respawn them");
    trig SetCursorHint("HINT_NOICON");
    trig waittill("trigger",player);
    //Clear zombies
    zombies = zombie_utility::get_round_enemy_array();
        if ( isdefined( zombies ) )
        {
            array::run_all( zombies, &Kill );
        }
}
And also I'm trying to add multiple triggers with the same targetname but when I add more than one it says "Not available"
Anyone know what I can do? :(
eDeK:
To use always put a...
while
{
   //CODE
}
To use multiple triggers with the same targetname use...
trigs = GetEntArray("my_trigger","targetname");
foreach(trig in trigs)
{
     trig SetCursorHint("HINT_NOICON");
     trig UseTriggerRequireLookAt();         
     trig SetHintString("TEXT");               
     //MORE THINGS TO DO                             
}
Pepergogo:
To use always put a...
while { //CODE }
To use multiple triggers with the same targetname use...
trigs = GetEntArray("my_trigger","targetname"); foreach(trig in trigs) { trig SetCursorHint("HINT_NOICON"); trig UseTriggerRequireLookAt(); trig SetHintString("TEXT"); //MORE THINGS TO DO }
********************************************************************************
UNRECOVERABLE ERROR:
^1SCRIPT ERROR: No generated data for 'scripts/zm/zm_parasite.gsc'
ERR(0) scripts/zm/zm_parasite.gsc (110,3) in "zombie_respawn()" : syntax error, unexpected TOKEN_LEFT_CURLY, expecting TOKEN_LEFT_PAREN :         {
Linker will now terminate.
********************************************************************************//Respawn Zombies
function zombie_respawn()
{
    trigs = GetEntArray("zom_clear","targetname");
    foreach(trig in trigs)
    {
        trig SetCursorHint("HINT_NOICON");
        trig UseTriggerRequireLookAt();        
        trig SetHintString("If zombies don't spawn, press ^3&&1^7 to respawn them");
        //trig waittill("trigger",player);            
   
        while //Also try while()
        {
            //Clear zombies
            zombies = zombie_utility::get_round_enemy_array();
            if ( isdefined( zombies ) )
            {
                array::run_all( zombies, &Kill );
            }
        }
    }                          
}eDeK:
function zombie_respawn()
{
    while(1)
    {
        trigs = GetEntArray("zom_clear","targetname");
        foreach(trig in trigs)
        {
            trig SetCursorHint("HINT_NOICON");
            trig UseTriggerRequireLookAt();       
            trig SetHintString("If zombies don't spawn, press ^3&&1^7 to respawn them");
            trig waittill("trigger",player);     
            
            zombies = zombie_utility::get_round_enemy_array();
            if ( isdefined( zombies ) )
            {
                array::run_all( zombies, &Kill );               
            }
            wait 0.1;
        }
        wait 0.1;
    }                         
}
Spiki:
function zombie_respawn() { while(1) { trigs = GetEntArray("zom_clear","targetname"); foreach(trig in trigs) { trig SetCursorHint("HINT_NOICON"); trig UseTriggerRequireLookAt(); trig SetHintString("If zombies don't spawn, press ^3&&1^7 to respawn them"); trig waittill("trigger",player); zombies = zombie_utility::get_round_enemy_array(); if ( isdefined( zombies ) ) { array::run_all( zombies, &Kill ); } wait 0.1; } wait 0.1; } }
Pepergogo:
function zombie_respawn() { while(1) { trigs = GetEntArray("zom_clear","targetname"); foreach(trig in trigs) { trig SetCursorHint("HINT_NOICON"); trig UseTriggerRequireLookAt(); trig SetHintString("If zombies don't spawn, press ^3&&1^7 to respawn them"); trig waittill("trigger",player); zombies = zombie_utility::get_round_enemy_array(); if ( isdefined( zombies ) ) { array::run_all( zombies, &Kill ); } wait 0.1; } wait 0.1; } }
 
   


eDeK:
function triggers()
{       
    trigs = GetEntArray("xxx","targetname");
    foreach(trig in trigs)
    {
        trig SetCursorHint("HINT_NOICON");
        trig UseTriggerRequireLookAt();     
        trig SetHintString("If zombies don't spawn, press ^3&&1^7 to respawn them");
        trig thread action(trig);                   
    }           
}
function action(trig)
{
    while(1)
    {           
        trig waittill("trigger",player);   
                                  
        zombies = zombie_utility::get_round_enemy_array();
        if ( isdefined( zombies ) )
        {
            array::run_all( zombies, &Kill );             
        }
        wait 0.1;
    }     
}
Pepergogo:
function triggers() { trigs = GetEntArray("xxx","targetname"); foreach(trig in trigs) { trig SetCursorHint("HINT_NOICON"); trig UseTriggerRequireLookAt(); trig SetHintString("If zombies don't spawn, press ^3&&1^7 to respawn them"); trig thread action(trig); } } function action(trig) { while(1) { trig waittill("trigger",player); zombies = zombie_utility::get_round_enemy_array(); if ( isdefined( zombies ) ) { array::run_all( zombies, &Kill ); } wait 0.1; } }