


Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!

![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() UGX V.I.P. | |
![]() | Has shown excellence and experience in the area of custom mapping in the UGX-Mods community. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
#include common_scripts\utility;
#include maps\_zombiemode_utility;
#include maps\_utility;
main()
{
sat_model = getent("sat_model","targetname");
sat_model hide();
players = get_players();
for(i=0;i<players.size;i++)
{
players[i].gotsat = false;
}
thread sat();
}
sat()
{
sat_trig = GetEntArray("dark1","targetname");
rand = randomintrange(0,sat_trig.size);
for(i=0;i<sat_trig.size;i++)
{
if(i==rand)
{
sat_trig[i] thread script_sat();
}
else
{
key = getent(sat_trig[i].target,"targetname");
key Delete();
sat_trig[i] Delete();
}
}
}
script_sat()
{
sat_model = getent("sat_model","targetname");
sat_model hide();
self UseTriggerRequireLookAt();
self SetHintString( "Press &&1 To grab the Satelite");
self SetCursorHint( "HINT_NOICON" );
place_sat = getent("place_sat", "targetname");
player = undefined;
rand = randomintrange(1,2);
keypickup = getent(self.target,"targetname");
place_sat UseTriggerRequireLookAt();
place_sat setHintString("Door data Corrupted, Re-download new settings. Find a Satelite...");
place_sat SetCursorHint( "HINT_NOICON" );
self waittill ("trigger",player);
player.gotsat = true;
iPrintLnBold ("You found the Satelite");
wait(1);
self Delete();
place_sat SetHintString( "Press &&1 To Put The Satelite");
wait(0.05);
self Delete();
keypickup Delete();
while(1)
{
place_sat waittill ("trigger",player);
if(player.gotsat)
{
place_sat UseTriggerRequireLookAt();
place_sat SetHintString( "Press &&1 To start the Download");
place_sat SetCursorHint( "HINT_NOICON" );
place_sat waittill ("trigger",player);
place_sat delete();
wait(0.5);
iPrintLnBold ("^2Downloading files 0 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 10 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 20 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 30 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 40 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 50 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 60 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 70 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 80 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 90 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 100 percent");
wait(1);
iPrintLnBold ("^2All Files Downloaded");
wait(1);
caseros_door = getent("mision_caseros","targetname");
caseros_door movez(-100,3);
caseros_door connectpaths();
wait(0.1);
flag_set("enter_zone5");
//set_flag_on_trigger( trig, "enter_zonev1" );
wait(0.1);
break;
//wait(randomintrange(min,max));
}
}
}
level thread maps\script_test::main();![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() UGX V.I.P. | |
![]() | Has shown excellence and experience in the area of custom mapping in the UGX-Mods community. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
The fact that its a zone flag that you're setting leads me to believe you have a zoning issue or the zone isn't targeting any zombies.
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() UGX V.I.P. | |
![]() | Has shown excellence and experience in the area of custom mapping in the UGX-Mods community. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
the zone works perfectly, becuase before you have to open it like a normal debris
Well that's the only thing that I can see the script looks fine - though you did delete the trigger, which was providing the only wait in your while loop, before your script reached the break. Not sure if that would cause an infinite loop or not - but I'm pretty sure its something zone related if its not.
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() UGX V.I.P. | |
![]() | Has shown excellence and experience in the area of custom mapping in the UGX-Mods community. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
Does a break even escape out of a while loop? Never tried lol.
Yes? what do you use breaks for? they are a function to break a loop - whether that be a while loop or a for loop.

![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() UGX V.I.P. | |
![]() | Has shown excellence and experience in the area of custom mapping in the UGX-Mods community. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
fixed, i move the level thread maps\script_test::main(); under the zombiemode line and it works perfectly
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
Ah so it was a flag issue then, well its good that its working now.
@daedra descent have a look at treyarch's code, they use breaks in while loops all the time. I also forgot to mention that breaks are used in switch cases as well.
edit: maybe i forgot to say that i put that line over the zombiemode line



![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
wait(0.5);
iPrintLnBold ("^2Downloading files 0 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 10 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 20 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 30 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 40 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 50 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 60 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 70 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 80 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 90 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 100 percent");
wait(1);
iPrintLnBold ("^2All Files Downloaded");
wait(1);
y u no use for loopscript_sat()
{
sat_model = getent("sat_model","targetname");
sat_model hide();
self UseTriggerRequireLookAt();
self SetHintString( "Press &&1 To grab the Satelite");
self SetCursorHint( "HINT_NOICON" );
place_sat = getent("place_sat", "targetname");
player = undefined;
rand = randomintrange(1,2);
keypickup = getent(self.target,"targetname");
place_sat UseTriggerRequireLookAt();
place_sat setHintString("Door data Corrupted, Re-download new settings. Find a Satelite...");
place_sat SetCursorHint( "HINT_NOICON" );
self waittill ("trigger",player);
player.gotsat = true;
iPrintLnBold ("You found the Satelite");
wait(1);
self Delete();
place_sat SetHintString( "Press &&1 To Put The Satelite");
wait(0.05);
self Delete();
keypickup Delete();
while(1)
{
place_sat waittill ("trigger",player);
if(player.gotsat)
{
place_sat UseTriggerRequireLookAt();
place_sat SetHintString( "Press &&1 To start the Download");
place_sat SetCursorHint( "HINT_NOICON" );
place_sat waittill ("trigger",player);
place_sat delete();
wait(0.5);
for( p=0; p<101; p+=10 ) // this doesn't use 20 lines of clutter
{
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files " + p + " percent");
}
wait(1);
iPrintLnBold ("^2All Files Downloaded");
wait(1);
caseros_door = getent("mision_caseros","targetname");
caseros_door movez(-100,3);
caseros_door connectpaths();
wait(0.1);
flag_set("enter_zone5");
//set_flag_on_trigger( trig, "enter_zonev1" );
wait(0.1);
break;
//wait(randomintrange(min,max));
}
}
}

Code SnippetPlaintextwait(0.5);
iPrintLnBold ("^2Downloading files 0 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 10 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 20 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 30 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 40 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 50 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 60 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 70 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 80 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 90 percent");
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files 100 percent");
wait(1);
iPrintLnBold ("^2All Files Downloaded");
wait(1);y u no use for loop
Code SnippetPlaintextscript_sat()
{
sat_model = getent("sat_model","targetname");
sat_model hide();
self UseTriggerRequireLookAt();
self SetHintString( "Press &&1 To grab the Satelite");
self SetCursorHint( "HINT_NOICON" );
place_sat = getent("place_sat", "targetname");
player = undefined;
rand = randomintrange(1,2);
keypickup = getent(self.target,"targetname");
place_sat UseTriggerRequireLookAt();
place_sat setHintString("Door data Corrupted, Re-download new settings. Find a Satelite...");
place_sat SetCursorHint( "HINT_NOICON" );
self waittill ("trigger",player);
player.gotsat = true;
iPrintLnBold ("You found the Satelite");
wait(1);
self Delete();
place_sat SetHintString( "Press &&1 To Put The Satelite");
wait(0.05);
self Delete();
keypickup Delete();
while(1)
{
place_sat waittill ("trigger",player);
if(player.gotsat)
{
place_sat UseTriggerRequireLookAt();
place_sat SetHintString( "Press &&1 To start the Download");
place_sat SetCursorHint( "HINT_NOICON" );
place_sat waittill ("trigger",player);
place_sat delete();
wait(0.5);
for( p=0; p<101; p+=10 ) // this doesn't use 20 lines of clutter
{
wait(randomintrange(10,60));
iPrintLnBold ("^2Downloading files " + p + " percent");
}
wait(1);
iPrintLnBold ("^2All Files Downloaded");
wait(1);
caseros_door = getent("mision_caseros","targetname");
caseros_door movez(-100,3);
caseros_door connectpaths();
wait(0.1);
flag_set("enter_zone5");
//set_flag_on_trigger( trig, "enter_zonev1" );
wait(0.1);
break;
//wait(randomintrange(min,max));
}
}
}
Just to tidy the code up a bit
#include common_scripts\utility;
#include maps\_zombiemode_utility;
#include maps\_utility;
main()
{
thread newend();
}
newend()
{
cost = 0;
who = undefined;
trig = getEnt("end_trigger","targetname");
if(!isDefined(trig))
return;
trig_player_check = getEnt(trig.target,"targetname");
if(!isDefined(trig_player_check)){
trig sethintstring("Error Can't find player check trigger :(");
return;
}
// Power stuff. Remove this if you don't want to wait for power.
// Remove power lines if you want it to work without power
trig setcursorhint("HINT_NOICON");
trig sethintstring("Press &&1 to close");
while(1)
{
trig waittill("trigger",who);
// got the money ??
if(who.score >= cost)
{
who maps\_zombiemode_score::minus_to_player_score(cost);
alive = AlivePlayersArr();
touching = trig_player_check GetTouchingPlayers();
if(alive.size != touching)
{
Texthud = tom_make_hud(undefined, "center", "middle", "center", "bottom", 0, -148, 1.2, 1, (1,1,1));
Texthud setText("All players must be here");
while(alive.size != touching)
{
alive = AlivePlayersArr();
touching = trig_player_check GetTouchingPlayers();
wait 0.1; // this loop won't run long so lets go mental.
}
Texthud destroy();
trig delete();
}
trig playsound("alarm_dark");
DoTelePort(alive);
trig delete();
}
else
{
trig playsound("no_cha_ching");
}
wait 0.15;
}
}
DoTelePort(players)
{
hatch_clip = getEnt( "clip", "targetname" );
hatch_clip movez(100,3);
hatch = getEnt( "door", "targetname" );
hatch movex(-75,3);
wait(1);
flag_set( "enter_zonev1" );
wait(0.1);
//thread toone();
wait(2);
hatch_clip delete();
wait(1);
/* v2_apagado = getEnt( "enter_zonev2", "script_flag" );
v2_apagado trigger_on(); */
}
kill_all_zombies()
{
wait(1);
zombs = getAiArray( "axis", "all" );
wait(0.05);
for( i = 0; i < zombs.size; i++ )
{
wait(0.05);
zombs[i] doDamage( zombs[i].health + 666, (0,0,0) );
wait(0.05);
}
}
tom_make_hud(client, alignXArg, alignYArg, horzAlignArg, vertAlignArg, xArg, yArg, fontScale, alpha, Textcolor)
{
if(isDefined(client))
hud = newClientHudElem(client);
else
hud = newHudElem();
hud.alignX = alignXArg;
hud.alignY = alignYArg;
hud.horzAlign = horzAlignArg;
hud.vertAlign = vertAlignArg;
hud.y = yArg;
hud.x = xArg;
hud.foreground = true;
hud.font = "default";
hud.fontScale = fontScale;
hud.alpha = alpha;
if(isDefined(Textcolor))
hud.color = (Textcolor);
else
hud.color = ( 1.0, 1.0, 1.0 );
return hud;
}
GetTouchingPlayers()
{
if(isdefined(self))
{
players = get_players();
num = 0;
for(i=0;i<players.size;i++)
if(players[i] istouching(self))
num ++;
return num;
}
else
{
iPrintLnBold("GetTouchingPlayers(): Needs to be called on a object");
return -1;
}
}
AlivePlayersArr()
{
alive = [];
players = get_players();
for(i=0;i<players.size;i++)
{
if( !players[i].is_zombie && !players[i] maps\_laststand::player_is_in_laststand() && players[i].sessionstate != "spectator" )
alive[alive.size] = players[i];
}
return alive;
}