• Welcome Guest, The new Modme forums are here! Please visit here for all recommended information.

Answered Help scripting small EE Fight

ModmeBot

Modme hero
Thread By: simplyzak09
Hi,
I'm not so good at scripting and was wondering if anyone could help me write a script for a mini-boss fight.

What I want is
<ul><li>A player walks on a trigger and an audio will play</li>
<li>While the audio is playing the skybox changes </li>
<li>a trigger use spawns on a button in the room that the player walks in </li>
<li>When the player triggers that button a set amount of dogs will spawn on the map </li>
<li>after 2 mins then another trigger spawns on another button,</li>
<li>when that second trigger use is triggered another set of dogs spawn,</li>
<li>then again after 3 mins, a third and final trigger use spawns on the last button.</li>
<li>triggering this spawns another set of dogs.</li>
<li>after 3 mins has passed again new audio plays and objects on the map disappear and then a new door opens for the player </li>
</ul>
So far I have this

PHP:
thread Boss_Fight();


function Boss_Fight()
{
 {
 trig = GetEnt("Boss_trigger",targetname");
 trig waittill("trigger",player);
 level.playSoundLocation PlaySound("audioFileHere");
 }
 
 function change_skybox()
 {
  trig = GetEnt("Boss_trigger","targetname");
  trig waittill("trigger",player);
  level util::set_lighting_state(2);
  }
  
}
I don't know if what I got so far even is right, I'm doing this on a test map first before moving it over to my actual map it's meant for

any help is welcomed as I'm new to scripting with GSC, And anyone who helps I will give credit to on the steam page when the map I'm working on gets finished.
 

ModmeBot

Modme hero
Reply By: mathfag
No offence but your bossfight is repetitive af. I never tested this but here you go


Manually add trigger_use on the buttons
PHP:
#using scripts\zm\_zm_ai_dogs;


function Boss_Fight()
{
level endon("bossfight_end");

trig = GetEnt("Boss_trigger","targetname");
button1 = GetEnt("button1","targetname");
button2 = GetEnt("button2","targetname");
button3 = GetEnt("button3","targetname");

button1 TriggerEnable(0);
button2 TriggerEnable(0);
button3 TriggerEnable(0);

trig waittill("trigger",player);
  
foreach(player in GetPlayers())
player PlayLocalSound("audioFileHere");

util::set_lighting_state(2);

button1 TriggerEnable(1);

button1 waittill("trigger", player);

for( i=0;i<20;i++ ) //20 dogs will spawn at once
	{
	level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined);
	}

wait 120 ; //120 secs == 2 mins

button2 TriggerEnable(1);

button2 waittill("trigger", player);

for( i=0;i<20;i++ ) //20 dogs will spawn at once
	{
	level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined);
	}

wait 180;

button3 TriggerEnable(1);

button3 waittill("trigger", player);

for( i=0;i<20;i++ ) //20 dogs will spawn at once
	{
	level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined);
	}

wait 180;

foreach(player in GetPlayers())
player PlayLocalSound("audioFileHere");

objects = GetEntArray("post_boss_objects","targetname"); //all script_models with the targetname post_boss_objects disappear
door = GetEnt("post_boss_door","targetname"); 


foreach(object in objects)
	object Delete();

door MoveZ(-100,1,0.2,0.2); //MoveZ(,,[acceleration time],[deceleration time])

}
 

ModmeBot

Modme hero
Reply By: simplyzak09
mathfag
No offence but your bossfight is repetitive af. I never tested this but here you go Manually add trigger_use on the buttons #using scripts\zm\_zm_ai_dogs; function Boss_Fight() { level endon("bossfight_end"); trig = GetEnt("Boss_trigger","targetname"); button1 = GetEnt("button1","targetname"); button2 = GetEnt("button2","targetname"); button3 = GetEnt("button3","targetname"); button1 TriggerEnable(0); button2 TriggerEnable(0); button3 TriggerEnable(0); trig waittill("trigger",player); foreach(player in GetPlayers()) player PlayLocalSound("audioFileHere"); util::set_lighting_state(2); button1 TriggerEnable(1); button1 waittill("trigger", player); for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } wait 120 ; //120 secs == 2 mins button2 TriggerEnable(1); button2 waittill("trigger", player); for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } wait 180; button3 TriggerEnable(1); button3 waittill("trigger", player); for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } wait 180; foreach(player in GetPlayers()) player PlayLocalSound("audioFileHere"); objects = GetEntArray("post_boss_objects","targetname"); //all script_models with the targetname post_boss_objects disappear door = GetEnt("post_boss_door","targetname"); foreach(object in objects) object Delete(); door MoveZ(-100,1,0.2,0.2); //MoveZ(,,[acceleration time],[deceleration time]) }
Thanks it worked great,

I have just been modifying it slightly to play a sound to alert the player that the next section is ready, I am also changing my idea for the boss fight slightly to make up for the fact of the steps being repetitive by each time the challenge getting more difficult.

and with that, I have an another question

Is it possible to have infinite dog spawns for 2 mins then stops?, I have been reading up on Loops (For and While) and I managed to get infinite dogs to keep spawning but I can't seem to get them to stop spawning after 2 minutes has passed

here are some of the scripts I have tried
PHP:
for( i=0;i<120;i++ ) //120 dogs will spawn at once
	{
	level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined);
	}
{	
wait 1 ; 
 if (i == int1)
 {
  break;
  }
  
 }
 
 
for( i=0;i<20;i++ ) //20 dogs will spawn at once
	{
	level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined);
	}
{	
wait 120 ; //120 secs == 2 mins
 if (i == 20)
 {
  break;
  }
 }

 
 for(;;)
 {
	level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined);
	}
{
wait 1;
if (i == 120)
{
 break;
}
}
 

ModmeBot

Modme hero
Reply By: mathfag
simplyzak09
mathfag No offence but your bossfight is repetitive af. I never tested this but here you go Manually add trigger_use on the buttons #using scripts\zm\_zm_ai_dogs; function Boss_Fight() { level endon("bossfight_end"); trig = GetEnt("Boss_trigger","targetname"); button1 = GetEnt("button1","targetname"); button2 = GetEnt("button2","targetname"); button3 = GetEnt("button3","targetname"); button1 TriggerEnable(0); button2 TriggerEnable(0); button3 TriggerEnable(0); trig waittill("trigger",player); foreach(player in GetPlayers()) player PlayLocalSound("audioFileHere"); util::set_lighting_state(2); button1 TriggerEnable(1); button1 waittill("trigger", player); for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } wait 120 ; //120 secs == 2 mins button2 TriggerEnable(1); button2 waittill("trigger", player); for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } wait 180; button3 TriggerEnable(1); button3 waittill("trigger", player); for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } wait 180; foreach(player in GetPlayers()) player PlayLocalSound("audioFileHere"); objects = GetEntArray("post_boss_objects","targetname"); //all script_models with the targetname post_boss_objects disappear door = GetEnt("post_boss_door","targetname"); foreach(object in objects) object Delete(); door MoveZ(-100,1,0.2,0.2); //MoveZ(,,[acceleration time],[deceleration time]) } Thanks it worked great, I have just been modifying it slightly to play a sound to alert the player that the next section is ready, I am also changing my idea for the boss fight slightly to make up for the fact of the steps being repetitive by each time the challenge getting more difficult. and with that, I have an another question Is it possible to have infinite dog spawns for 2 mins then stops?, I have been reading up on Loops (For and While) and I managed to get infinite dogs to keep spawning but I can't seem to get them to stop spawning after 2 minutes has passed here are some of the scripts I have tried for( i=0;i<120;i++ ) //120 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } { wait 1 ; if (i == int1) { break; } } for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } { wait 120 ; //120 secs == 2 mins if (i == 20) { break; } } for(;;) { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } { wait 1; if (i == 120) { break; } }
As long as there are less than 25 "enemies" dogs will spawn


PHP:
function infinite_dogs()
{
	level endon("boss_round_complete");
	level endon("boss_round2_complete");
	level endon("boss_round3_complete");
	level endon("intermission");
	//IPrintLnBold("infinite dogs");
	
    //dog_spawner = GetEntArray("zombie_dog_spawner","script_noteworthy");

	zm_count = zombie_utility::get_current_zombie_count();

	while(1)
	{
		while(zm_count<25)
		{

			level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined);
			
			zm_count = zombie_utility::get_current_zombie_count();

			wait(5);
		}
	zm_count = zombie_utility::get_current_zombie_count();
	wait(1);
	}
}
To stop the dogs add the line
PHP:
level notify("boss_round_complete");
after the wait(120);
 

ModmeBot

Modme hero
Reply By: simplyzak09
mathfag
simplyzak09 mathfag No offence but your bossfight is repetitive af. I never tested this but here you go Manually add trigger_use on the buttons #using scripts\zm\_zm_ai_dogs; function Boss_Fight() { level endon("bossfight_end"); trig = GetEnt("Boss_trigger","targetname"); button1 = GetEnt("button1","targetname"); button2 = GetEnt("button2","targetname"); button3 = GetEnt("button3","targetname"); button1 TriggerEnable(0); button2 TriggerEnable(0); button3 TriggerEnable(0); trig waittill("trigger",player); foreach(player in GetPlayers()) player PlayLocalSound("audioFileHere"); util::set_lighting_state(2); button1 TriggerEnable(1); button1 waittill("trigger", player); for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } wait 120 ; //120 secs == 2 mins button2 TriggerEnable(1); button2 waittill("trigger", player); for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } wait 180; button3 TriggerEnable(1); button3 waittill("trigger", player); for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } wait 180; foreach(player in GetPlayers()) player PlayLocalSound("audioFileHere"); objects = GetEntArray("post_boss_objects","targetname"); //all script_models with the targetname post_boss_objects disappear door = GetEnt("post_boss_door","targetname"); foreach(object in objects) object Delete(); door MoveZ(-100,1,0.2,0.2); //MoveZ(,,[acceleration time],[deceleration time]) } Thanks it worked great, I have just been modifying it slightly to play a sound to alert the player that the next section is ready, I am also changing my idea for the boss fight slightly to make up for the fact of the steps being repetitive by each time the challenge getting more difficult. and with that, I have an another question Is it possible to have infinite dog spawns for 2 mins then stops?, I have been reading up on Loops (For and While) and I managed to get infinite dogs to keep spawning but I can't seem to get them to stop spawning after 2 minutes has passed here are some of the scripts I have tried for( i=0;i<120;i++ ) //120 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } { wait 1 ; if (i == int1) { break; } } for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } { wait 120 ; //120 secs == 2 mins if (i == 20) { break; } } for(;;) { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } { wait 1; if (i == 120) { break; } } As long as there are less than 25 "enemies" dogs will spawn function infinite_dogs() { level endon("boss_round_complete"); level endon("boss_round2_complete"); level endon("boss_round3_complete"); level endon("intermission"); //IPrintLnBold("infinite dogs"); //dog_spawner = GetEntArray("zombie_dog_spawner","script_noteworthy"); zm_count = zombie_utility::get_current_zombie_count(); while(1) { while(zm_count<25) { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); zm_count = zombie_utility::get_current_zombie_count(); wait(5); } zm_count = zombie_utility::get_current_zombie_count(); wait(1); } } To stop the dogs add the line level notify("boss_round_complete"); after the wait(120);
Sorry to be a pain but where in the script do I place the function infinite_dogs() script, I've tried to put it where the old spawn 20 dogs part was and that gives me this error

PHP:
^1function
^1-------^
^1ERR(0) scripts/zm/zm_test.gsc (138,8) in "boss_fight()" : syntax error, unexpected TOKEN_FUNCTION : function
and then I tried adding it under the function: boss_fight() and it doesn't do anything

PHP:
function infinite_dogs()
{
	level endon("boss_round_complete");
	level endon("boss_round2_complete");
	level endon("boss_round3_complete");
	level endon("intermission");
	//IPrintLnBold("infinite dogs");
	
    //dog_spawner = GetEntArray("zombie_dog_spawner","script_noteworthy");

	zm_count = zombie_utility::get_current_zombie_count();

	while(1)
	{
		while(zm_count<25)
		{

			level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined);
			
			zm_count = zombie_utility::get_current_zombie_count();

			wait(5);
		}
	zm_count = zombie_utility::get_current_zombie_count();
	wait(1);
	}
}
 

ModmeBot

Modme hero
Reply By: mathfag
simplyzak09
mathfag simplyzak09 mathfag No offence but your bossfight is repetitive af. I never tested this but here you go Manually add trigger_use on the buttons #using scripts\zm\_zm_ai_dogs; function Boss_Fight() { level endon("bossfight_end"); trig = GetEnt("Boss_trigger","targetname"); button1 = GetEnt("button1","targetname"); button2 = GetEnt("button2","targetname"); button3 = GetEnt("button3","targetname"); button1 TriggerEnable(0); button2 TriggerEnable(0); button3 TriggerEnable(0); trig waittill("trigger",player); foreach(player in GetPlayers()) player PlayLocalSound("audioFileHere"); util::set_lighting_state(2); button1 TriggerEnable(1); button1 waittill("trigger", player); for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } wait 120 ; //120 secs == 2 mins button2 TriggerEnable(1); button2 waittill("trigger", player); for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } wait 180; button3 TriggerEnable(1); button3 waittill("trigger", player); for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } wait 180; foreach(player in GetPlayers()) player PlayLocalSound("audioFileHere"); objects = GetEntArray("post_boss_objects","targetname"); //all script_models with the targetname post_boss_objects disappear door = GetEnt("post_boss_door","targetname"); foreach(object in objects) object Delete(); door MoveZ(-100,1,0.2,0.2); //MoveZ(,,[acceleration time],[deceleration time]) } Thanks it worked great, I have just been modifying it slightly to play a sound to alert the player that the next section is ready, I am also changing my idea for the boss fight slightly to make up for the fact of the steps being repetitive by each time the challenge getting more difficult. and with that, I have an another question Is it possible to have infinite dog spawns for 2 mins then stops?, I have been reading up on Loops (For and While) and I managed to get infinite dogs to keep spawning but I can't seem to get them to stop spawning after 2 minutes has passed here are some of the scripts I have tried for( i=0;i<120;i++ ) //120 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } { wait 1 ; if (i == int1) { break; } } for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } { wait 120 ; //120 secs == 2 mins if (i == 20) { break; } } for(;;) { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } { wait 1; if (i == 120) { break; } } As long as there are less than 25 "enemies" dogs will spawn function infinite_dogs() { level endon("boss_round_complete"); level endon("boss_round2_complete"); level endon("boss_round3_complete"); level endon("intermission"); //IPrintLnBold("infinite dogs"); //dog_spawner = GetEntArray("zombie_dog_spawner","script_noteworthy"); zm_count = zombie_utility::get_current_zombie_count(); while(1) { while(zm_count<25) { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); zm_count = zombie_utility::get_current_zombie_count(); wait(5); } zm_count = zombie_utility::get_current_zombie_count(); wait(1); } } To stop the dogs add the line level notify("boss_round_complete"); after the wait(120); Sorry to be a pain but where in the script do I place the function infinite_dogs() script, I've tried to put it where the old spawn 20 dogs part was and that gives me this error ^1function ^1-------^ ^1ERR(0) scripts/zm/zm_test.gsc (138,8) in "boss_fight()" : syntax error, unexpected TOKEN_FUNCTION : function and then I tried adding it under the function: boss_fight() and it doesn't do anything function infinite_dogs() { level endon("boss_round_complete"); level endon("boss_round2_complete"); level endon("boss_round3_complete"); level endon("intermission"); //IPrintLnBold("infinite dogs"); //dog_spawner = GetEntArray("zombie_dog_spawner","script_noteworthy"); zm_count = zombie_utility::get_current_zombie_count(); while(1) { while(zm_count<25) { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); zm_count = zombie_utility::get_current_zombie_count(); wait(5); } zm_count = zombie_utility::get_current_zombie_count(); wait(1); } }
Functions are like paragraphs in an essay. You can't put one in another. Paste "function infinite_dogs()" at the bottom of the script and when you need the dogs to spawn replace the for(;;) loop with this

PHP:
thread infinite_dogs();
and when you need it to end (after the wait(120);) add
PHP:
level notify("boss_round_complete")

also read this
 

ModmeBot

Modme hero
Reply By: simplyzak09
mathfag
simplyzak09 mathfag simplyzak09 mathfag No offence but your bossfight is repetitive af. I never tested this but here you go Manually add trigger_use on the buttons #using scripts\zm\_zm_ai_dogs; function Boss_Fight() { level endon("bossfight_end"); trig = GetEnt("Boss_trigger","targetname"); button1 = GetEnt("button1","targetname"); button2 = GetEnt("button2","targetname"); button3 = GetEnt("button3","targetname"); button1 TriggerEnable(0); button2 TriggerEnable(0); button3 TriggerEnable(0); trig waittill("trigger",player); foreach(player in GetPlayers()) player PlayLocalSound("audioFileHere"); util::set_lighting_state(2); button1 TriggerEnable(1); button1 waittill("trigger", player); for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } wait 120 ; //120 secs == 2 mins button2 TriggerEnable(1); button2 waittill("trigger", player); for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } wait 180; button3 TriggerEnable(1); button3 waittill("trigger", player); for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } wait 180; foreach(player in GetPlayers()) player PlayLocalSound("audioFileHere"); objects = GetEntArray("post_boss_objects","targetname"); //all script_models with the targetname post_boss_objects disappear door = GetEnt("post_boss_door","targetname"); foreach(object in objects) object Delete(); door MoveZ(-100,1,0.2,0.2); //MoveZ(,,[acceleration time],[deceleration time]) } Thanks it worked great, I have just been modifying it slightly to play a sound to alert the player that the next section is ready, I am also changing my idea for the boss fight slightly to make up for the fact of the steps being repetitive by each time the challenge getting more difficult. and with that, I have an another question Is it possible to have infinite dog spawns for 2 mins then stops?, I have been reading up on Loops (For and While) and I managed to get infinite dogs to keep spawning but I can't seem to get them to stop spawning after 2 minutes has passed here are some of the scripts I have tried for( i=0;i<120;i++ ) //120 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } { wait 1 ; if (i == int1) { break; } } for( i=0;i<20;i++ ) //20 dogs will spawn at once { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } { wait 120 ; //120 secs == 2 mins if (i == 20) { break; } } for(;;) { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); } { wait 1; if (i == 120) { break; } } As long as there are less than 25 "enemies" dogs will spawn function infinite_dogs() { level endon("boss_round_complete"); level endon("boss_round2_complete"); level endon("boss_round3_complete"); level endon("intermission"); //IPrintLnBold("infinite dogs"); //dog_spawner = GetEntArray("zombie_dog_spawner","script_noteworthy"); zm_count = zombie_utility::get_current_zombie_count(); while(1) { while(zm_count<25) { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); zm_count = zombie_utility::get_current_zombie_count(); wait(5); } zm_count = zombie_utility::get_current_zombie_count(); wait(1); } } To stop the dogs add the line level notify("boss_round_complete"); after the wait(120); Sorry to be a pain but where in the script do I place the function infinite_dogs() script, I've tried to put it where the old spawn 20 dogs part was and that gives me this error ^1function ^1-------^ ^1ERR(0) scripts/zm/zm_test.gsc (138,8) in "boss_fight()" : syntax error, unexpected TOKEN_FUNCTION : function and then I tried adding it under the function: boss_fight() and it doesn't do anything function infinite_dogs() { level endon("boss_round_complete"); level endon("boss_round2_complete"); level endon("boss_round3_complete"); level endon("intermission"); //IPrintLnBold("infinite dogs"); //dog_spawner = GetEntArray("zombie_dog_spawner","script_noteworthy"); zm_count = zombie_utility::get_current_zombie_count(); while(1) { while(zm_count<25) { level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined); zm_count = zombie_utility::get_current_zombie_count(); wait(5); } zm_count = zombie_utility::get_current_zombie_count(); wait(1); } } Functions are like paragraphs in an essay. You can't put one in another. Paste "function infinite_dogs()" at the bottom of the script and when you need the dogs to spawn replace the for(;;) loop with this thread infinite_dogs(); and when you need it to end (after the wait(120);) add level notify("boss_round_complete") also read this
thank you so much for your help :)
The script is working great
 

Magicman

Well-known member
Reply By: mathfag
No offence but your bossfight is repetitive af. I never tested this but here you go


Manually add trigger_use on the buttons
PHP:
#using scripts\zm\_zm_ai_dogs;


function Boss_Fight()
{
level endon("bossfight_end");

trig = GetEnt("Boss_trigger","targetname");
button1 = GetEnt("button1","targetname");
button2 = GetEnt("button2","targetname");
button3 = GetEnt("button3","targetname");

button1 TriggerEnable(0);
button2 TriggerEnable(0);
button3 TriggerEnable(0);

trig waittill("trigger",player);
 
foreach(player in GetPlayers())
player PlayLocalSound("audioFileHere");

util::set_lighting_state(2);

button1 TriggerEnable(1);

button1 waittill("trigger", player);

for( i=0;i<20;i++ ) //20 dogs will spawn at once
    {
    level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined);
    }

wait 120 ; //120 secs == 2 mins

button2 TriggerEnable(1);

button2 waittill("trigger", player);

for( i=0;i<20;i++ ) //20 dogs will spawn at once
    {
    level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined);
    }

wait 180;

button3 TriggerEnable(1);

button3 waittill("trigger", player);

for( i=0;i<20;i++ ) //20 dogs will spawn at once
    {
    level thread zm_ai_dogs::special_dog_spawn( 2, undefined, undefined);
    }

wait 180;

foreach(player in GetPlayers())
player PlayLocalSound("audioFileHere");

objects = GetEntArray("post_boss_objects","targetname"); //all script_models with the targetname post_boss_objects disappear
door = GetEnt("post_boss_door","targetname");


foreach(object in objects)
    object Delete();

door MoveZ(-100,1,0.2,0.2); //MoveZ(,,[acceleration time],[deceleration time])

}
suppose I wanted to make it so that on the first round, dogs spawn, then brutus (NSZ version), then Harry's panzer on the third, what modifications would I have to put on the script to achieve this?
 

Pepergogo

Undead member
suppose I wanted to make it so that on the first round, dogs spawn, then brutus (NSZ version), then Harry's panzer on the third, what modifications would I have to put on the script to achieve this?
Brutus already come with an option to spawn multiple of them from a certain round.

But I don't know if you can combine with the Panzer.

I know you can't put Brutus and the Napalm and Shrieker from Harry in the same map without some modification, but I don't know about the Panzer.
 

Magicman

Well-known member
Brutus already come with an option to spawn multiple of them from a certain round.

But I don't know if you can combine with the Panzer.

I know you can't put Brutus and the Napalm and Shrieker from Harry in the same map without some modification, but I don't know about the Panzer.
That is good to know. However, is there anyway to spawn a certain amount of brutuses with the press of a button, like how this script allows you to spawn a certain amount of dogs?
 
Top