Post: The Maze Runner [ Gamemode ] Source
04-21-2016, 04:25 AM #1
ODLeslie
Do a barrel roll!
(adsbygoogle = window.adsbygoogle || []).push({}); Today i'm releasing my gamemode i made a few months back, "The Maze Runner", Its Basically a maze with like 6 carepackage's and one of them will end the game and say "Maze Completed!", others will take you back to the start. Originally it would give the you a gun and combat axe's to kill the other players, but i did something wrong and cbf to change it back, you can change whatever you want in it, make map edits, do whatever but if you do, please keep in mind i spent my time on making this, and i've decided to release it so people can make it better but hey, leaches will be leaches and can't do anything about that, every coder knows that.

Leach all you want cause in the end, i'm the one who made it and released it and everyone knows it Winky Winky

Hoping some of you can update the game and add more maps!

Shoutout to: Matrix ( Some Functions ) (youtube.com/user/ItzMatriix), personnumber1 ( Helping out with coding, release ), MrMoan ( Video! Sub to his channel! )

For the idiots out there, its a source so no need for a virus scan.

Start on Free for all

Photo's:


You must login or register to view this content.



Video ( By MrMoan ):


Here is the source code:
    
/*

Please Read Me!

ODLeslie's Maze Runner Source! I have put in a welcome message that shows the host's name, and there is also
a ShoutOuts Function where you can put your name if you want so please dont leach i spent my time on making
this gamemode and only released it so people can make map edits, and also try to make the game better!
If you do so please give credit and hit me up with the edit! Will give you credit on what you add!
I know its not amazing considering theres only one map and once you find out where to go its almost pointless
but i'm hoping you guys can fix it up seeing im working on group projects now.

Shoutout to:
Matrixx - Some of his Coding from his old gamemodes!
( Other than matrixx i made whats here myself - As for Now of course)

- Important! -
Things you might want to know:
There is shit in here that you will wonder why its in the script, thats because
i originaly made it so when sombody finished the maze they get a gun and combat axe's to kill everyone else but
i fucked the coding up and the lives wouldn't change so it was all fucked, so i just remade some of it so then
now the game ends when someone finishes the maze.

If someone can make it so that the player who finishes the maze's name comes up as the winner, that'd be
amazing and i'd give credit, i'd do it myself but i honestly cbf thats why i'm releasing the source. :P

Pretty dirty / messy coding cause idgaf -.-

Hope you enjoy this **** of a mode. -Leslie

*/

#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
#include maps\mp\_scoreevents;
#include maps\mp\teams\_teams;
#include maps\mp\gametypes\_spawnlogic;
#include maps\mp\gametypes\_spawning;

init()
{
foreach( model in strTok( "p6_dockside_container_lrg_orange", ",") )
precacheModel( model );
level thread onPlayerConnect();
level thread mapEdits();
level thread weaponsetup();
level.PlayersEliminated = 0;
level.TotalCount = 0;
level.GameStarted = false;
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);
player thread onPlayerSpawned();
player thread mrsetup();
player thread finishLap();
player thread TryAnotherPath();
player thread TryAnotherPath2();
player thread TryAnotherPath3();
player thread TryAnotherPath4();
player thread TryAnotherPath5();
player thread TryAnotherPath6();
player thread TryAnotherPath7();
player thread OnScreenText();
player thread checkIfStarted();
player thread startover();
player thread newText();
// player thread ShoutOuts();
player.isPlaying = true;
player.haveGuns = false;
if(player isHost())
player thread tForce();
else
player thread noTeamChange();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
self changeteam("allies");
for(;Winky Winky
{
self waittill("spawned_player");
if(self.isPlaying)
{
self thread startover();
self.LivesText setText("Lives Left: ^2" + self.lpp["lives"]);
self thread noGunsCheck();
}
self doWeapons();
self setupPerks();
self MessageBIG();
// self thread coords(); //Use for mapping Smile
if(self.lpp["lives"] <= 0)
{
self notify("NoLives");
self thread uOutBitch();
}
}
}

coords()
{
self endon("disconnect");
self endon("NoLives");
self endon("GameOver");
for(;Winky Winky
{
self iprintln(self.origin + " - " + self.angles);
wait 2;
}
}

noGunsCheck()
{
self endon("disconnect");
self endon("GameOver");
self endon("NoLives");
self endon("death");
self waittill("EscapeStarted");
for(;Winky Winky
{
if(!(self.haveGuns) && (self getCurrentWeapon() != "knife_mp"))
{
self thread doWeapons();
wait 2;
}
wait 1;
}
}

checkIfStarted()
{
self waittill("spawned_player");
if(level.GameStarted)
{
self thread noPlay();
}
}

startover()
{
wait 0.1;
self setOrigin(level.startPoint);
}

mazedonebro()
{
wait 0.1;
self setOrigin(level.finishedmaze);
}

startover()
{
self endon("death");
self endon("disconnect");
for(;Winky Winky
{
if(self actionSlotTwoButtonPressed())
{
self startover();
}
wait 0.1;
}
}

noMoving()
{
self endon("EscapeStarted");
self endon("disconnect");
self endon("NoLives");
self endon("GameOver");
for(;Winky Winky
{
self freezeControls(true);
wait 1;
}
}

noTeamChange()
{
self endon("disconnect");
self endon("game_ended");
self waittill("spawned_player");
for(;Winky Winky
{
self maps/mp/gametypes/_globallogic_ui::closemenus();
wait 0.01;
}
}

setupPerks()
{
self clearPerks();
if(self.isPlaying)
{
self setperk("specialty_unlimitedsprint");
self setperk("specialty_sprintrecovery");
self setperk("specialty_movefaster");
self setperk("specialty_fallheight");
}
else
{
self setperk("specialty_bulletaccuracy");
self setperk("specialty_bulletdamage");
self setperk("specialty_bulletflinch");
self setperk("specialty_bulletpenetration");
self setperk("specialty_fastads");
self setperk("specialty_loudenemies");
self setperk("specialty_marksman");
self setperk("specialty_fallheight");
}
}

doWeapons()
{
self takeAllWeapons();
if(self.haveGuns)
{
if(self.isPlaying)
{
self giveWeapon(level.CompletedWeaps[0], 0, true ( 29, 0, 0, 0, 0 ));
self giveMaxAmmo(level.CompletedWeaps[0]);
self giveWeapon(level.CompletedWeaps[1], 0, true ( 29, 0, 0, 0, 0 ));
self giveMaxAmmo(level.CompletedWeaps[1]);
self switchToWeapon(level.CompletedWeaps[0]);
}
}
}

//Original ( When the maze is completed by a player the player recieved a pistol and a combat axe, DOESNT WORK ANYMORE I FUCKED IT )

/*finishLap()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.finishPoint) < 50)
{
self.mazecomp--;
self thread mazedonebro();
self iPrintlnBold("^1MaZe ^2Completed");
self.LapsText setText("^7Maze Status: ^2Complete ");
if(self.mazecomp == 0)
{
self.haveGuns = true;
self thread doWeapons();
self iPrintlnBold("^1Kill ^7the Enemies!");
}
wait 5;
}
}
wait 0.01;
}
}
*/

//Current ( Ends game when someone completes maze )
finishLap()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.finishPoint) < 50)
{
self.mazecomp--;
self thread mazedonebro();
if(self.mazecomp == 0)
{
self thread EndGame();
}
wait 5;
}
}
wait 0.01;
}
}

EndGame()
{
level thread maps/mp/gametypes/_globallogic::endgame("tie", "The ^3Maze^7 Was Completed");
}

newText()
{
wait 5;
game["strings"]["tie"] = "^3Maze Completed!";
}

TryAnotherPath()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.WrongPathStupid) < 50)
{
self thread startover();
self iPrintlnBold("^1Try Again Bro...");
}
} wait 5;
wait 0.01;
}
}

TryAnotherPath2()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.WrongPathStupid2) < 100)
{
self thread startover();
self iPrintlnBold("^1Try Again Bro...");
}
} wait 5;
wait 0.01;
}
}

TryAnotherPath3()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.WrongPathStupid3) < 100)
{
self thread startover();
self iPrintlnBold("^1Try Again Bro...");
}
} wait 5;
wait 0.01;
}
}

TryAnotherPath4()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.WrongPathStupid4) < 150)
{
self thread startover();
self iPrintlnBold("^1Try Again Bro...");
}
} wait 5;
wait 0.01;
}
}

TryAnotherPath5()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.WrongPathStupid5) < 150)
{
self thread startover();
self iPrintlnBold("^1Try Again Bro...");
}
} wait 5;
wait 0.01;
}
}

TryAnotherPath6()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.WrongPathStupid6) < 150)
{
self thread startover();
self iPrintlnBold("^1Try Again Bro...");
}
} wait 5;
wait 0.01;
}
}

TryAnotherPath7()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.WrongPathStupid7) < 150)
{
self thread startover();
self iPrintlnBold("^1Try Again Bro...");
}
} wait 5;
wait 0.01;
}
}

watchEndGame()
{
if(level.HMplayersEliminated == level.numplayrz)
{
foreach(player in level.players)
player notify("GameOver");
level notify("GameOver");
thread maps/mp/gametypes/_globallogic::endgame("tie", "^1MaZe Runner");
}
else if(level.PlayersEliminated == (level.TotalCount - level.numplayrz))
{
foreach(player in level.players)
player notify("GameOver");
level notify("GameOver");
thread maps/mp/gametypes/_globallogic::endgame("tie", "^1MaZe Runner");
}
}
//Matrixx's Spectating script :P
uOutBitch()
{
self endon("disconnect");
self endon("GameOver");
self notify("NoLives");
self iPrintlnBold("It Appears You Are ^1Out of Lives. ^7Enjoy The Show");
self iPrintln("Press [{+frag}] to Move Around");
if(self.lpp["team"] == "allies")
level.PlayersEliminated+=1;
else if(self.lpp["team"] == "axis")
level.HMplayersEliminated+=1;
self.outOfGame = true;
self EnableInvulnerability();
self takeAllWeapons();
self hide();
wait 0.5;
if(isDefined(self.LapsText)) self.LapsText destroy();
if(isDefined(self.LivesText)) self.LivesText destroy();
// self thread watchEndGame();
self.ufo = spawn("script_model", self.origin);
self playerLinkTo(self.ufo);
for(;Winky Winky
{
if(self fragButtonPressed())
{
self.Fly = self.origin+vector_scal(anglesToForward(self getPlayerAngles()),30);
self.ufo moveTo(self.Fly,.01);
}
wait 0.01;
}
}

noPlay()
{
self endon("disconnect");
self endon("GameOver");
self notify("NoLives");
self iPrintlnBold("It Appears You ^1Joined Late. ^7Enjoy The Show");
self iPrintln("Press [{+frag}] to Move Around");
self EnableInvulnerability();
self takeAllWeapons();
self hide();
wait 0.5;
if(isDefined(self.LapsText)) self.LapsText destroy();
if(isDefined(self.LivesText)) self.LivesText destroy();
self.outOfGame = true;
self.ufo = spawn("script_model", self.origin);
self playerLinkTo(self.ufo);
for(;Winky Winky
{
if(self fragButtonPressed())
{
self.Fly = self.origin+vector_scal(anglesToForward(self getPlayerAngles()),30);
self.ufo moveTo(self.Fly,.01);
}
wait 0.01;
}
}

/*
ShoutOuts()
{
self endon("disconnect");
for(;Winky Winky
{
self iPrintln("Shoutouts:");
self iPrintln("^1 YourNameHere");
wait 30;
}
}
*/

// Take away the /* and */ the change the "YourNameHere" To whoever you want to shoutout, dont forget to
// Go back to the top and remove the // Before "Player Thread ShoutOuts();"

MessageBIG()
{
self thread optionCalledMesage("^7Welcome To ^3The Maze Runner", 1, "^7Hosted By ^5" + level.hostname , (30, 0, 115), Cool Man (aka Tustin);
}

//utilities ( make a new script called util.gsc or whatever you want .gsc and copy and paste
//from here till "//maps"- Makes it easier to locate )

vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}

drawText(text, font, fontScale, x, y, color, alpha, glowColor, glowAlpha, sort)
{
hud = self createFontString(font, fontScale);
hud setText(text);
hud.x = x;
hud.y = y;
hud.color = color;
hud.alpha = alpha;
hud.glowColor = glowColor;
hud.glowAlpha = glowAlpha;
hud.sort = sort;
hud.alpha = alpha;
return hud;
}

deathBarrier()
{
ents = getEntArray();
for ( index = 0; index < ents.size; index++ )
{
if(isSubStr(ents[index].classname, "trigger_hurt"))
ents[index].origin = (0, 0, 9999999);
}
}

tForce()
{
self endon("disconnect");
self endon("GameOver");
self endon("NoLives");
for(;Winky Winky
{
if(self getStance() == "prone" && self meleeButtonPressed())
{
self thread Cheat();
wait 2;
}
wait 0.01;
}
}

Cheat()
{
if(!isDefined(self.host) || self.host == false)
{
self setOrigin(level.finishPoint);
}
}

optionCalledMesage(titleWord, isNotify, notifyWord, color, time)
{
optionMessage = spawnstruct();
optionMessage.titleText = titleWord;
if(isNotify == 1)
{
optionMessage.notifyText = notifyWord;
}
optionMessage.glowColor = color;
optionMessage.duration = time;
optionMessage.font = "objective";
optionMessage.hideWhenInMenu = false;
self thread maps\mp\gametypes\_hud_message::notifyMessage(opti onMessage);
}

createObject(model, origin, angle)
{
return spawnEntity("script_model", model, origin, angle);
}

OrangeContainer(pos, angle)
{
OrangeCon = spawn("script_model", pos );
OrangeCon setModel("p6_dockside_container_lrg_orange");
OrangeCon.angles = angle;
}

spawnEntity(class, model, origin, angle)
{
entity = spawn(class, origin);
entity.angles = angle;
entity setModel(model);
return entity;
}

//maps ( maps.gsc )

mapEdits()
{
if(getDvar("mapname") == "mp_dockside")
{
level.startPoint = (470,-465,55);
level.finishPoint = (-1690,1750,-45);
level.finishedmaze =(-60,1405,-100);
level.WrongPathStupid =(-530,2070,70);
level.WrongPathStupid2 =(-434,3458,-5);
level.WrongPathStupid3 =(890,1650,50);
level.WrongPathStupid4 =(645,3175,-45);
level.WrongPathStupid5 =(-1172,748,-75);
level.WrongPathStupid6 =(-1367,1396,-15);
level.WrongPathStupid7 =(-975,1505,-70);
//null

level createBlock((-1172,748,-65), (0,0,0));
level createBlock((-1367,1396,-5), (0,50,0));
level createBlock((-975,1505,-60), (0,90,0));

level createBlock((-1690,1750,-45), (0,0,0));
level createBlock((-1070,445,-30), (0,0,90));
level createBlock((620,1460,-40), (0,0,90));
level createBlock((1215,1795,90), (0,0,90));
level createBlock((645,3175,-65), (0,0,0));
level createBlock((-790,2185,100), (0,0,90));
level createBlock((-1112,1170,65), (0,90,0));
level createBlock((-1025,1170,65), (0,90,0));
level createBlock((-1845,1560,-50), (0,0,90));
level createBlock((-600,3660,-15), (0,0,90));
level createBlock((-530,2070,70), (0,0,0));
level createBlock((4,3140,10), (0,25,0));
level createBlock((35,3055,10), (0,260,0));
// level createBlock((635,1460,100), (0,0,0));
level createBlock((890,1650,50), (0,0,0));

level createObject(("p6_dockside_container_lrg_orange"), (-300, 300, -65), (0, 0, 0));//near spawn
level createObject(("p6_dockside_container_lrg_orange"), (-1090, 1890, -65), (0, 0, 0));//dockside near end
level createObject(("p6_dockside_container_lrg_orange"), (-1250, 365, -65), (0, -25, 0));//dockside diagonal
level createObject(("p6_dockside_container_lrg_orange"), (-1290, 200, -65), (0, 90, 0));//dockside
level createObject(("p6_dockside_container_lrg_orange"), (90, -420, -20), (0, 90, 0));//near spawn
level createObject(("p6_dockside_container_lrg_orange"), (535, 880, -65), (0, 0, 0));//block to mid
level createObject(("p6_dockside_container_lrg_orange"), (1080, 1015, -100), (0, 90, 0));//block to underground
level createObject(("p6_dockside_container_lrg_orange"), (111, 2290, -7Cool Man (aka Tustin), (0, 90, 0));//block to mid 2
level createObject(("p6_dockside_container_lrg_orange"), (-960, 2990, -75), (0, 0, 0));//truck
level createObject(("p6_dockside_container_lrg_orange"), (-1285, 1670, -60), (0, 90, 0));//next to end

level thread WallPointToPoint((-775,285,-35),(-935,285,-35),1);
level thread WallPointToPoint((-1520,2385,-50),(-1520,2195,-50),2);
level thread WallPointToPoint((-1180,2760,-50),(-1520,2385,-50),1);
level thread WallPointToPoint((610,-640,85),(460,-640,85),2);
level thread WallPointToPoint((-670,2825,-50),(-670,3090,-50),2);
level thread WallPointToPoint((-670,3090,-50),(160,3090,-55),2);
level thread WallPointToPoint((110,3090,-55),(110,3250,-55),2);
level thread WallPointToPoint((-670,3090,-150),(105,3175,-150),1);
level thread WallPointToPoint((-60,3345,-65),(-360,3475,-65),3);
level thread WallPointToPoint((-547,2012,75),(-800,2012,75),2);
}
}

createBlock(pos,ang)
{
Crate = spawn("script_model", pos);
Crate setmodel("t6_wpn_supply_drop_ally");
Crate.angles = ang;
}

WallPointToPoint(start, end, height)
{
Dist = distance((start[0], start[1], 0), (end[0], end[1], 0));
Blocks = roundUp(Dist / 70);
IntervalX = (end[0] - start[0]) / Blocks;
IntervalY = (end[1] - start[1]) / Blocks;
BlockAngles = (0, (VectorToAngles(end - start)[1] + 90), 0);
for(i = 0; i < height; i++)
{
for(x = 0; x < Blocks; x++)
{
createBlock(start + (0,0,20) + ((IntervalX, IntervalY, 0) * x) + (0,0,(36 * i)), BlockAngles);
wait 0.001;
}
}
}

roundUp(floatVal)
{
if (int(floatVal) != floatVal)
return int(floatVal + 1);
else
return int(floatVal);
}

//Dump ( dump.gsc - This is not used but if you remove it remove where its being called cause i cbf )

//This is what used to happen when you finsh the maze you'd get these weapons to kill the others, DOESNT WORK NOW
weaponsetup() //Weapons you get given after completing maze to kill other players (not used anymore)
{
level.CompletedWeaps[0] = "judge_mp+extbarrel"; //Executioner
level.CompletedWeaps[1] = "hatchet_mp"; //Combat Axe
}

mrsetup()
{
self.mazecomp = 1; //Amount of times you need to complete the maze before you finish + get weapons
self.lpp["lives"] = 2; //Lives
}

//These arent in use anymore but if you remove them and dont remove where they are being called dont say "It freeze's" to me.

//Here is where i've put my credit for making my gamemode leaches will be leaches, add your name if you have 2
OnScreenText()
{
self.SheWazeGunner = self drawText("^F^3The Maze Runner", "objective", 1.8, 0, -20, (1,1,1), 1, (30,0,115), 0, 1);
self.LezIieSext = self drawText("^7Created By ^6ODLeslie", "objective", 1.2, 0, 400, (1,1,1), 1, (30,0,115), 0, 1);
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following 3 users say thank you to ODLeslie for this useful post:

Frosty, Nate͍, OfficialCoolJay
04-22-2016, 07:16 AM #11
MrMoan
Big Daddy
here you go bro
sorry the game sounds alil high i was playing with settings
You must login or register to view this content.

The following user thanked MrMoan for this useful post:

ODLeslie
04-22-2016, 12:18 PM #12
RobbieMc20
Bounty hunter
Will deffo give this a try Happy thanks!

The following user thanked RobbieMc20 for this useful post:

ODLeslie
04-24-2016, 03:47 AM #13
S63
Space Ninja
Nice bro your on fire Winky Winky

The following user thanked S63 for this useful post:

ODLeslie
04-24-2016, 09:00 AM #14
Originally posted by ODLeslie View Post
Today i'm releasing my gamemode i made a few months back, "The Maze Runner", Its Basically a maze with like 6 carepackage's and one of them will end the game and say "Maze Completed!", others will take you back to the start. Originally it would give the you a gun and combat axe's to kill the other players, but i did something wrong and cbf to change it back, you can change whatever you want in it, make map edits, do whatever but if you do, please keep in mind i spent my time on making this, and i've decided to release it so people can make it better but hey, leaches will be leaches and can't do anything about that, every coder knows that.

Leach all you want cause in the end, i'm the one who made it and released it and everyone knows it Winky Winky

Hoping some of you can update the game and add more maps!

Shoutout to: Matrix ( Some Functions ) (youtube.com/user/ItzMatriix), personnumber1 ( Helping out with coding, release ), MrMoan ( Video! Sub to his channel! )

For the idiots out there, its a source so no need for a virus scan.

Start on Free for all

Photo's:


You must login or register to view this content.



Video ( By MrMoan ):


Here is the source code:
    
/*

Please Read Me!

ODLeslie's Maze Runner Source! I have put in a welcome message that shows the host's name, and there is also
a ShoutOuts Function where you can put your name if you want so please dont leach i spent my time on making
this gamemode and only released it so people can make map edits, and also try to make the game better!
If you do so please give credit and hit me up with the edit! Will give you credit on what you add!
I know its not amazing considering theres only one map and once you find out where to go its almost pointless
but i'm hoping you guys can fix it up seeing im working on group projects now.

Shoutout to:
Matrixx - Some of his Coding from his old gamemodes!
( Other than matrixx i made whats here myself - As for Now of course)

- Important! -
Things you might want to know:
There is shit in here that you will wonder why its in the script, thats because
i originaly made it so when sombody finished the maze they get a gun and combat axe's to kill everyone else but
i fucked the coding up and the lives wouldn't change so it was all fucked, so i just remade some of it so then
now the game ends when someone finishes the maze.

If someone can make it so that the player who finishes the maze's name comes up as the winner, that'd be
amazing and i'd give credit, i'd do it myself but i honestly cbf thats why i'm releasing the source. :P

Pretty dirty / messy coding cause idgaf -.-

Hope you enjoy this **** of a mode. -Leslie

*/

#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
#include maps\mp\_scoreevents;
#include maps\mp\teams\_teams;
#include maps\mp\gametypes\_spawnlogic;
#include maps\mp\gametypes\_spawning;

init()
{
foreach( model in strTok( "p6_dockside_container_lrg_orange", ",") )
precacheModel( model );
level thread onPlayerConnect();
level thread mapEdits();
level thread weaponsetup();
level.PlayersEliminated = 0;
level.TotalCount = 0;
level.GameStarted = false;
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);
player thread onPlayerSpawned();
player thread mrsetup();
player thread finishLap();
player thread TryAnotherPath();
player thread TryAnotherPath2();
player thread TryAnotherPath3();
player thread TryAnotherPath4();
player thread TryAnotherPath5();
player thread TryAnotherPath6();
player thread TryAnotherPath7();
player thread OnScreenText();
player thread checkIfStarted();
player thread startover();
player thread newText();
// player thread ShoutOuts();
player.isPlaying = true;
player.haveGuns = false;
if(player isHost())
player thread tForce();
else
player thread noTeamChange();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
self changeteam("allies");
for(;Winky Winky
{
self waittill("spawned_player");
if(self.isPlaying)
{
self thread startover();
self.LivesText setText("Lives Left: ^2" + self.lpp["lives"]);
self thread noGunsCheck();
}
self doWeapons();
self setupPerks();
self MessageBIG();
// self thread coords(); //Use for mapping Smile
if(self.lpp["lives"] <= 0)
{
self notify("NoLives");
self thread uOutBitch();
}
}
}

coords()
{
self endon("disconnect");
self endon("NoLives");
self endon("GameOver");
for(;Winky Winky
{
self iprintln(self.origin + " - " + self.angles);
wait 2;
}
}

noGunsCheck()
{
self endon("disconnect");
self endon("GameOver");
self endon("NoLives");
self endon("death");
self waittill("EscapeStarted");
for(;Winky Winky
{
if(!(self.haveGuns) && (self getCurrentWeapon() != "knife_mp"))
{
self thread doWeapons();
wait 2;
}
wait 1;
}
}

checkIfStarted()
{
self waittill("spawned_player");
if(level.GameStarted)
{
self thread noPlay();
}
}

startover()
{
wait 0.1;
self setOrigin(level.startPoint);
}

mazedonebro()
{
wait 0.1;
self setOrigin(level.finishedmaze);
}

startover()
{
self endon("death");
self endon("disconnect");
for(;Winky Winky
{
if(self actionSlotTwoButtonPressed())
{
self startover();
}
wait 0.1;
}
}

noMoving()
{
self endon("EscapeStarted");
self endon("disconnect");
self endon("NoLives");
self endon("GameOver");
for(;Winky Winky
{
self freezeControls(true);
wait 1;
}
}

noTeamChange()
{
self endon("disconnect");
self endon("game_ended");
self waittill("spawned_player");
for(;Winky Winky
{
self maps/mp/gametypes/_globallogic_ui::closemenus();
wait 0.01;
}
}

setupPerks()
{
self clearPerks();
if(self.isPlaying)
{
self setperk("specialty_unlimitedsprint");
self setperk("specialty_sprintrecovery");
self setperk("specialty_movefaster");
self setperk("specialty_fallheight");
}
else
{
self setperk("specialty_bulletaccuracy");
self setperk("specialty_bulletdamage");
self setperk("specialty_bulletflinch");
self setperk("specialty_bulletpenetration");
self setperk("specialty_fastads");
self setperk("specialty_loudenemies");
self setperk("specialty_marksman");
self setperk("specialty_fallheight");
}
}

doWeapons()
{
self takeAllWeapons();
if(self.haveGuns)
{
if(self.isPlaying)
{
self giveWeapon(level.CompletedWeaps[0], 0, true ( 29, 0, 0, 0, 0 ));
self giveMaxAmmo(level.CompletedWeaps[0]);
self giveWeapon(level.CompletedWeaps[1], 0, true ( 29, 0, 0, 0, 0 ));
self giveMaxAmmo(level.CompletedWeaps[1]);
self switchToWeapon(level.CompletedWeaps[0]);
}
}
}

//Original ( When the maze is completed by a player the player recieved a pistol and a combat axe, DOESNT WORK ANYMORE I FUCKED IT )

/*finishLap()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.finishPoint) < 50)
{
self.mazecomp--;
self thread mazedonebro();
self iPrintlnBold("^1MaZe ^2Completed");
self.LapsText setText("^7Maze Status: ^2Complete ");
if(self.mazecomp == 0)
{
self.haveGuns = true;
self thread doWeapons();
self iPrintlnBold("^1Kill ^7the Enemies!");
}
wait 5;
}
}
wait 0.01;
}
}
*/

//Current ( Ends game when someone completes maze )
finishLap()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.finishPoint) < 50)
{
self.mazecomp--;
self thread mazedonebro();
if(self.mazecomp == 0)
{
self thread EndGame();
}
wait 5;
}
}
wait 0.01;
}
}

EndGame()
{
level thread maps/mp/gametypes/_globallogic::endgame("tie", "The ^3Maze^7 Was Completed");
}

newText()
{
wait 5;
game["strings"]["tie"] = "^3Maze Completed!";
}

TryAnotherPath()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.WrongPathStupid) < 50)
{
self thread startover();
self iPrintlnBold("^1Try Again Bro...");
}
} wait 5;
wait 0.01;
}
}

TryAnotherPath2()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.WrongPathStupid2) < 100)
{
self thread startover();
self iPrintlnBold("^1Try Again Bro...");
}
} wait 5;
wait 0.01;
}
}

TryAnotherPath3()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.WrongPathStupid3) < 100)
{
self thread startover();
self iPrintlnBold("^1Try Again Bro...");
}
} wait 5;
wait 0.01;
}
}

TryAnotherPath4()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.WrongPathStupid4) < 150)
{
self thread startover();
self iPrintlnBold("^1Try Again Bro...");
}
} wait 5;
wait 0.01;
}
}

TryAnotherPath5()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.WrongPathStupid5) < 150)
{
self thread startover();
self iPrintlnBold("^1Try Again Bro...");
}
} wait 5;
wait 0.01;
}
}

TryAnotherPath6()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.WrongPathStupid6) < 150)
{
self thread startover();
self iPrintlnBold("^1Try Again Bro...");
}
} wait 5;
wait 0.01;
}
}

TryAnotherPath7()
{
self endon("disconnect");
self endon("NoLives");
self endon("game_ended");
self endon("GameOver");
self freezeControls(false);
for(;Winky Winky
{
if(self.isPlaying)
{
if(distance(self.origin, level.WrongPathStupid7) < 150)
{
self thread startover();
self iPrintlnBold("^1Try Again Bro...");
}
} wait 5;
wait 0.01;
}
}

watchEndGame()
{
if(level.HMplayersEliminated == level.numplayrz)
{
foreach(player in level.players)
player notify("GameOver");
level notify("GameOver");
thread maps/mp/gametypes/_globallogic::endgame("tie", "^1MaZe Runner");
}
else if(level.PlayersEliminated == (level.TotalCount - level.numplayrz))
{
foreach(player in level.players)
player notify("GameOver");
level notify("GameOver");
thread maps/mp/gametypes/_globallogic::endgame("tie", "^1MaZe Runner");
}
}
//Matrixx's Spectating script :P
uOutBitch()
{
self endon("disconnect");
self endon("GameOver");
self notify("NoLives");
self iPrintlnBold("It Appears You Are ^1Out of Lives. ^7Enjoy The Show");
self iPrintln("Press [{+frag}] to Move Around");
if(self.lpp["team"] == "allies")
level.PlayersEliminated+=1;
else if(self.lpp["team"] == "axis")
level.HMplayersEliminated+=1;
self.outOfGame = true;
self EnableInvulnerability();
self takeAllWeapons();
self hide();
wait 0.5;
if(isDefined(self.LapsText)) self.LapsText destroy();
if(isDefined(self.LivesText)) self.LivesText destroy();
// self thread watchEndGame();
self.ufo = spawn("script_model", self.origin);
self playerLinkTo(self.ufo);
for(;Winky Winky
{
if(self fragButtonPressed())
{
self.Fly = self.origin+vector_scal(anglesToForward(self getPlayerAngles()),30);
self.ufo moveTo(self.Fly,.01);
}
wait 0.01;
}
}

noPlay()
{
self endon("disconnect");
self endon("GameOver");
self notify("NoLives");
self iPrintlnBold("It Appears You ^1Joined Late. ^7Enjoy The Show");
self iPrintln("Press [{+frag}] to Move Around");
self EnableInvulnerability();
self takeAllWeapons();
self hide();
wait 0.5;
if(isDefined(self.LapsText)) self.LapsText destroy();
if(isDefined(self.LivesText)) self.LivesText destroy();
self.outOfGame = true;
self.ufo = spawn("script_model", self.origin);
self playerLinkTo(self.ufo);
for(;Winky Winky
{
if(self fragButtonPressed())
{
self.Fly = self.origin+vector_scal(anglesToForward(self getPlayerAngles()),30);
self.ufo moveTo(self.Fly,.01);
}
wait 0.01;
}
}

/*
ShoutOuts()
{
self endon("disconnect");
for(;Winky Winky
{
self iPrintln("Shoutouts:");
self iPrintln("^1 YourNameHere");
wait 30;
}
}
*/

// Take away the /* and */ the change the "YourNameHere" To whoever you want to shoutout, dont forget to
// Go back to the top and remove the // Before "Player Thread ShoutOuts();"

MessageBIG()
{
self thread optionCalledMesage("^7Welcome To ^3The Maze Runner", 1, "^7Hosted By ^5" + level.hostname , (30, 0, 115), Cool Man (aka Tustin);
}

//utilities ( make a new script called util.gsc or whatever you want .gsc and copy and paste
//from here till "//maps"- Makes it easier to locate )

vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}

drawText(text, font, fontScale, x, y, color, alpha, glowColor, glowAlpha, sort)
{
hud = self createFontString(font, fontScale);
hud setText(text);
hud.x = x;
hud.y = y;
hud.color = color;
hud.alpha = alpha;
hud.glowColor = glowColor;
hud.glowAlpha = glowAlpha;
hud.sort = sort;
hud.alpha = alpha;
return hud;
}

deathBarrier()
{
ents = getEntArray();
for ( index = 0; index < ents.size; index++ )
{
if(isSubStr(ents[index].classname, "trigger_hurt"))
ents[index].origin = (0, 0, 9999999);
}
}

tForce()
{
self endon("disconnect");
self endon("GameOver");
self endon("NoLives");
for(;Winky Winky
{
if(self getStance() == "prone" && self meleeButtonPressed())
{
self thread Cheat();
wait 2;
}
wait 0.01;
}
}

Cheat()
{
if(!isDefined(self.host) || self.host == false)
{
self setOrigin(level.finishPoint);
}
}

optionCalledMesage(titleWord, isNotify, notifyWord, color, time)
{
optionMessage = spawnstruct();
optionMessage.titleText = titleWord;
if(isNotify == 1)
{
optionMessage.notifyText = notifyWord;
}
optionMessage.glowColor = color;
optionMessage.duration = time;
optionMessage.font = "objective";
optionMessage.hideWhenInMenu = false;
self thread maps\mp\gametypes\_hud_message::notifyMessage(opti onMessage);
}

createObject(model, origin, angle)
{
return spawnEntity("script_model", model, origin, angle);
}

OrangeContainer(pos, angle)
{
OrangeCon = spawn("script_model", pos );
OrangeCon setModel("p6_dockside_container_lrg_orange");
OrangeCon.angles = angle;
}

spawnEntity(class, model, origin, angle)
{
entity = spawn(class, origin);
entity.angles = angle;
entity setModel(model);
return entity;
}

//maps ( maps.gsc )

mapEdits()
{
if(getDvar("mapname") == "mp_dockside")
{
level.startPoint = (470,-465,55);
level.finishPoint = (-1690,1750,-45);
level.finishedmaze =(-60,1405,-100);
level.WrongPathStupid =(-530,2070,70);
level.WrongPathStupid2 =(-434,3458,-5);
level.WrongPathStupid3 =(890,1650,50);
level.WrongPathStupid4 =(645,3175,-45);
level.WrongPathStupid5 =(-1172,748,-75);
level.WrongPathStupid6 =(-1367,1396,-15);
level.WrongPathStupid7 =(-975,1505,-70);
//null

level createBlock((-1172,748,-65), (0,0,0));
level createBlock((-1367,1396,-5), (0,50,0));
level createBlock((-975,1505,-60), (0,90,0));

level createBlock((-1690,1750,-45), (0,0,0));
level createBlock((-1070,445,-30), (0,0,90));
level createBlock((620,1460,-40), (0,0,90));
level createBlock((1215,1795,90), (0,0,90));
level createBlock((645,3175,-65), (0,0,0));
level createBlock((-790,2185,100), (0,0,90));
level createBlock((-1112,1170,65), (0,90,0));
level createBlock((-1025,1170,65), (0,90,0));
level createBlock((-1845,1560,-50), (0,0,90));
level createBlock((-600,3660,-15), (0,0,90));
level createBlock((-530,2070,70), (0,0,0));
level createBlock((4,3140,10), (0,25,0));
level createBlock((35,3055,10), (0,260,0));
// level createBlock((635,1460,100), (0,0,0));
level createBlock((890,1650,50), (0,0,0));

level createObject(("p6_dockside_container_lrg_orange"), (-300, 300, -65), (0, 0, 0));//near spawn
level createObject(("p6_dockside_container_lrg_orange"), (-1090, 1890, -65), (0, 0, 0));//dockside near end
level createObject(("p6_dockside_container_lrg_orange"), (-1250, 365, -65), (0, -25, 0));//dockside diagonal
level createObject(("p6_dockside_container_lrg_orange"), (-1290, 200, -65), (0, 90, 0));//dockside
level createObject(("p6_dockside_container_lrg_orange"), (90, -420, -20), (0, 90, 0));//near spawn
level createObject(("p6_dockside_container_lrg_orange"), (535, 880, -65), (0, 0, 0));//block to mid
level createObject(("p6_dockside_container_lrg_orange"), (1080, 1015, -100), (0, 90, 0));//block to underground
level createObject(("p6_dockside_container_lrg_orange"), (111, 2290, -7Cool Man (aka Tustin), (0, 90, 0));//block to mid 2
level createObject(("p6_dockside_container_lrg_orange"), (-960, 2990, -75), (0, 0, 0));//truck
level createObject(("p6_dockside_container_lrg_orange"), (-1285, 1670, -60), (0, 90, 0));//next to end

level thread WallPointToPoint((-775,285,-35),(-935,285,-35),1);
level thread WallPointToPoint((-1520,2385,-50),(-1520,2195,-50),2);
level thread WallPointToPoint((-1180,2760,-50),(-1520,2385,-50),1);
level thread WallPointToPoint((610,-640,85),(460,-640,85),2);
level thread WallPointToPoint((-670,2825,-50),(-670,3090,-50),2);
level thread WallPointToPoint((-670,3090,-50),(160,3090,-55),2);
level thread WallPointToPoint((110,3090,-55),(110,3250,-55),2);
level thread WallPointToPoint((-670,3090,-150),(105,3175,-150),1);
level thread WallPointToPoint((-60,3345,-65),(-360,3475,-65),3);
level thread WallPointToPoint((-547,2012,75),(-800,2012,75),2);
}
}

createBlock(pos,ang)
{
Crate = spawn("script_model", pos);
Crate setmodel("t6_wpn_supply_drop_ally");
Crate.angles = ang;
}

WallPointToPoint(start, end, height)
{
Dist = distance((start[0], start[1], 0), (end[0], end[1], 0));
Blocks = roundUp(Dist / 70);
IntervalX = (end[0] - start[0]) / Blocks;
IntervalY = (end[1] - start[1]) / Blocks;
BlockAngles = (0, (VectorToAngles(end - start)[1] + 90), 0);
for(i = 0; i < height; i++)
{
for(x = 0; x < Blocks; x++)
{
createBlock(start + (0,0,20) + ((IntervalX, IntervalY, 0) * x) + (0,0,(36 * i)), BlockAngles);
wait 0.001;
}
}
}

roundUp(floatVal)
{
if (int(floatVal) != floatVal)
return int(floatVal + 1);
else
return int(floatVal);
}

//Dump ( dump.gsc - This is not used but if you remove it remove where its being called cause i cbf )

//This is what used to happen when you finsh the maze you'd get these weapons to kill the others, DOESNT WORK NOW
weaponsetup() //Weapons you get given after completing maze to kill other players (not used anymore)
{
level.CompletedWeaps[0] = "judge_mp+extbarrel"; //Executioner
level.CompletedWeaps[1] = "hatchet_mp"; //Combat Axe
}

mrsetup()
{
self.mazecomp = 1; //Amount of times you need to complete the maze before you finish + get weapons
self.lpp["lives"] = 2; //Lives
}

//These arent in use anymore but if you remove them and dont remove where they are being called dont say "It freeze's" to me.

//Here is where i've put my credit for making my gamemode leaches will be leaches, add your name if you have 2
OnScreenText()
{
self.SheWazeGunner = self drawText("^F^3The Maze Runner", "objective", 1.8, 0, -20, (1,1,1), 1, (30,0,115), 0, 1);
self.LezIieSext = self drawText("^7Created By ^6ODLeslie", "objective", 1.2, 0, 400, (1,1,1), 1, (30,0,115), 0, 1);
}


Nice! Been wondering when a Maze Runner gamemode would come since Hunger Games came out! Just watch someone make a Qudditch gamemode now, lol

The following user thanked Frosty for this useful post:

ODLeslie
04-24-2016, 10:47 AM #15
stanzoheetik
Pokemon Trainer
thanks for the release Geo

The following user thanked stanzoheetik for this useful post:

ODLeslie
04-24-2016, 11:10 AM #16
ODLeslie
Do a barrel roll!
Appreciate everyone's comments haven't gotten any hate yet, so i suppose i'm doing alright ha, thanks heaps everyone sorry cbf replying one by one so hopefully you see this :/

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo