Modme Forums

NSZ brutus continous spawning

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


ModmeBot:

Thread By: mathfag

How do I make 5 NSZ's brutuses spawn, 2 at a time. I'm making an easter egg like in der eisendrache where the panzers just keep coming.

I have this so far (at the end of nsz's script):

function brutus_bossfight()
{
level thread spawn_brutus();

while( 1 )
    {
        if(level.current_brutuses < 2 && level.brutuss_killed < level.brutuss_to_kill)
        {
 		level thread spawn_brutus();
 		IPrintLnBold("brutus respawned");
		}

return;
}
}



and yes I added

level.brutuss_killed++;



to the function "new_death"


ModmeBot:

Reply By: Dan9977

what happens when you test this code?


ModmeBot:

Reply By: mathfag

Dan9977

what happens when you test this code?

Sometimes a brutus spawnes and no text and sometimes he spawns with the text "brutus respawned", but never multiple brutuses.

so basically I'm trapped in the bossfight with no boss (after I kill the 1)


ModmeBot:

Reply By: Dan9977

mathfag
Dan9977

what happens when you test this code?

Sometimes a brutus spawnes and no text and sometimes he spawns with the text "brutus respawned", but never multiple brutuses.

so basically I'm trapped in the bossfight with no boss (after I kill the 1)

try removing "return"

and maybe add "wait(1); to the while loop


ModmeBot:

Reply By: mathfag

Dan9977
mathfag
Dan9977

what happens when you test this code?



Sometimes a brutus spawnes and no text and sometimes he spawns with the text "brutus respawned", but never multiple brutuses.


so basically I'm trapped in the bossfight with no boss (after I kill the 1)



try removing "return"


and maybe add "wait(1); to the while loop



Worked :)