UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Flag_set cause inifinit loop

broken avatar :(
Created 11 years ago
by KDXDARK
0 Members and 1 Guest are viewing this topic.
4,224 views
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 2 days ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
For some reason when i use the flag_set function on my script i start to get a infinit loop killing thread, i already add a wait on the script and it keep happening, somebody know why?
Last Edit: October 25, 2015, 03:47:41 am by KDXDARK
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
Maybe if you show us the code and how you're calling it we might.  ;)
broken avatar :(
×
broken avatar :(
RadihaX
Location: caCanada
Date Registered: 2 September 2012
Last active: 5 years ago
Posts
978
Respect
Forum Rank
The Decider
Primary Group
Mapper Elite
My Groups
More
My Contact & Social Links
More
Signature
Overrun
Lockdown
Overrun (Black Ops Mod)
Snowglobe
Leviathan
Abandoned School
Ski Resort
Leviathan Redux
×
JBird632's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Mapper Elite Has shown excellence and experience in the area of custom mapping in the UGX-Mods community.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
JBird632's Contact & Social LinksJBird632JBird632JBird632JBird632JBird632Mapper
Flags usually mess up if they are not in a threaded function being called before _zombiemode.gsc
But like daedra said, you should post the code so we can see.
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 2 days ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
this is the script
Code Snippet
Plaintext
#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));
}
}
}

and this is how i put it into mapname.gsc
Code Snippet
Plaintext
	level thread maps\script_test::main();

and another question so i dont make another topic, how i can make a xanim convert it back to .tanim?
broken avatar :(
×
broken avatar :(
RadihaX
Location: caCanada
Date Registered: 2 September 2012
Last active: 5 years ago
Posts
978
Respect
Forum Rank
The Decider
Primary Group
Mapper Elite
My Groups
More
My Contact & Social Links
More
×
JBird632's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Mapper Elite Has shown excellence and experience in the area of custom mapping in the UGX-Mods community.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
JBird632's Contact & Social LinksJBird632JBird632JBird632JBird632JBird632Mapper
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.
Last Edit: October 25, 2015, 04:15:25 am by JBird632
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 2 days ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
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.
the zone works perfectly, becuase before you have to open it like a normal debris
broken avatar :(
×
broken avatar :(
RadihaX
Location: caCanada
Date Registered: 2 September 2012
Last active: 5 years ago
Posts
978
Respect
Forum Rank
The Decider
Primary Group
Mapper Elite
My Groups
More
My Contact & Social Links
More
×
JBird632's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Mapper Elite Has shown excellence and experience in the area of custom mapping in the UGX-Mods community.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
JBird632's Contact & Social LinksJBird632JBird632JBird632JBird632JBird632Mapper
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.
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
the zone works perfectly, becuase before you have to open it like a normal debris

Is the function call after the dlc3 zone init stuff? If not, i'd move it so it is.

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.

Does a break even escape out of a while loop? Never tried lol.



broken avatar :(
×
broken avatar :(
RadihaX
Location: caCanada
Date Registered: 2 September 2012
Last active: 5 years ago
Posts
978
Respect
Forum Rank
The Decider
Primary Group
Mapper Elite
My Groups
More
My Contact & Social Links
More
×
JBird632's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Mapper Elite Has shown excellence and experience in the area of custom mapping in the UGX-Mods community.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
JBird632's Contact & Social LinksJBird632JBird632JBird632JBird632JBird632Mapper
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.
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
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.

Typically you just don't use / see breaks in while statements, so i wasn't sure.
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 2 days ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
fixed, i move the level thread maps\script_test::main(); under the zombiemode line and it works perfectly

edit: maybe i forgot to say that i put that line over the zombiemode line :D
Last Edit: October 25, 2015, 04:45:05 am by KDXDARK
broken avatar :(
×
broken avatar :(
RadihaX
Location: caCanada
Date Registered: 2 September 2012
Last active: 5 years ago
Posts
978
Respect
Forum Rank
The Decider
Primary Group
Mapper Elite
My Groups
More
My Contact & Social Links
More
×
JBird632's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Mapper Elite Has shown excellence and experience in the area of custom mapping in the UGX-Mods community.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
JBird632's Contact & Social LinksJBird632JBird632JBird632JBird632JBird632Mapper
fixed, i move the level thread maps\script_test::main(); under the zombiemode line and it works perfectly
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.
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
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.
I reguarly use them infact, and most of the shangrila scripts i ported this week also do, would error with "illegal break statement" otherwise


Quote
edit: maybe i forgot to say that i put that line over the zombiemode line

other than for precaching, should always be after this ;)
Last Edit: October 25, 2015, 04:55:02 am by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: kp
Date Registered: 29 July 2015
Last active: 7 years ago
Posts
435
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
children should not be playing call of duty
Signature
⠀⠀⠀⣴⣴⡤
⠀⣠⠀⢿⠇⡇⠀⠀⠀⠀⠀⠀⠀⢰⢷⡗
⠀⢶⢽⠿⣗⠀⠀⠀⠀⠀⠀⠀⠀⣼⡧⠂⠀⠀⣼⣷⡆
⠀⠀⣾⢶⠐⣱⠀⠀⠀⠀⠀⣤⣜⣻⣧⣲⣦⠤⣧⣿⠶
⠀⢀⣿⣿⣇⠀⠀⠀⠀⠀⠀⠛⠿⣿⣿⣷⣤⣄⡹⣿⣷
⠀⢸⣿⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⢿⣿⣿⣿⣿⣿
⠀⠿⠃⠈⠿⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⠿⠿⠿

⠀⢀⢀⡀⠀⢀⣤⠀⠀⠀⠀⠀⠀⠀⡀⡀
⠀⣿⡟⡇⠀⠭⡋⠅⠀⠀⠀⠀⠀⢰⣟⢿
⠀⣹⡌⠀⠀⣨⣾⣷⣄⠀⠀⠀⠀⢈⠔⠌
⠰⣷⣿⡀⢐⢿⣿⣿⢻⠀⠀⠀⢠⣿⡿⡤⣴⠄⢀⣀⡀
⠘⣿⣿⠂⠈⢸⣿⣿⣸⠀⠀⠀⢘⣿⣿⣀⡠⣠⣺⣿⣷
⠀⣿⣿⡆⠀⢸⣿⣿⣾⡇⠀⣿⣿⣿⣿⣿⣗⣻⡻⠿⠁
⠀⣿⣿⡇⠀⢸⣿⣿⡇⠀⠀⠉⠉⠉⠉⠉⠉⠁
×
Koan's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Koan's Contact & Social Links_Koan_h-rmy website
Code Snippet
Plaintext
		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);

:kidding: y u no use for loop

Code Snippet
Plaintext
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);
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 :D
Last Edit: October 25, 2015, 07:57:40 am by Koan
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 2 days ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
Code Snippet
Plaintext
		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);

:kidding: y u no use for loop

Code Snippet
Plaintext
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);
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 :D
because i am new into scripting, i just know some basic stuff, also i start to get this error again but in another script, its called like the other one in the mapname.gsc
Code Snippet
Plaintext
#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;
}


level thread maps\end_now::main();

 
Loading ...