What's new

Discussion The Matrix Operation Game mode[Release]

  • Thread starter Sir Matrix
  • Start date
  • Views 2,002
Sir Matrix

Sir Matrix

Sing us a song, your the piano man!
Retired
Messages
2,171
Reaction score
1,136
Points
910
Hello everyone i finally made my first game mode. It is called the matrix operation and what you do is go through a series of missions throughout and find mysterious weapons.



Code:
MatrixOperation()
{
    self endon("death");
    self endon("disconnect");
    self.gameMode = 1;
    self thread CloseMenu();
    self thread lockMenu();
    self.hasTheMenu = false;
    players = getPlayers();
    for(k=0;k < getPlayers().size; k++)
    players[k] takeAllWeapons();
    self giveWeapon("zombie_ppsh");
    self giveWeapon("zombie_shotgun");
    wait 5;
    self thread MopWelcome();
    wait 5;
    self thread Op1();

}
MopWelcome()
{
    Notify = spawnStruct();
    Notify.titleText = "^2The Matrix Operation";
    Notify.notifyText = "^2 Made By Sir Matrix!";
    Notify.iconName = "rank_prestige10";
    self maps\_hud_message::notifyMessage( Notify );
}
Op1()
{
    self endon("death");
    self endon("disconnect");
    self endon("Op1Done");
    self thread Op1Instructions();
    KillsNeeded = 0;
    level.round_number = 10;
    self thread nuke_em();
    Zkills = createfontstring("objective",1.6);
    Zkills setPoint("BOTTOMCENTER","BOTTOMCENTER",0,0);
    wait 5;
    while(self.gameMode ==1)
    {
    self waittill( "zom_kill" );
    KillsNeeded++;
    Zkills setText("^1You killed "+KillsNeeded+" ^1out of 21 zombies");
    if(KillsNeeded == 21)
    {
        self iprintlnbold("^2Congragulations you have done it prepare for Operation 2");
        Zkills destroy();
        wait 10;
        self thread Op2();
    }
    }
}
Op1Instructions()
{
    Instruct = spawnStruct();
    Instruct.titleText = "You are to kill a total of 21 zombies";
    Instruct.notifyText = "Good luck on your first mission";
    Instruct.iconName = "rank_prestige1";
    self maps\_hud_message::notifyMessage( Instruct );
}
Op2()
{
    self endon("death");
    self endon("disconnect");
    self endon("Op2Done");
    self notify("Op1Done");
    self thread Op2Instructions();
    self setClientDvar( "ai_disableSpawn", "1" );
    self thread nuke_em();
    self thread PowerOn();
    self thread openAllDoors();
    bombsDestroied = 0;
    self thread bombOne();
    self thread bombTwo();
    self thread bombThree();
    Bomb = createfontstring("objective",1.6);
    Bomb setPoint("BOTTOMCENTER","BOTTOMCENTER",0,0);
    while(self.gameMode == 1)
    {

        self waittill("bombDestroy");
        bombsDestroied++;
        Bomb setText("^1You dissarmed "+bombsDestroied+" ^1out of 3 bombs");
        if(bombsDestroied == 3)
        {
            self notify("bombDisarmed");
            iprintln("Good Job man you did it");
            Bomb destroy();
            wait 5;
            self thread Op2Part2();
        }
    }
}
Op2Instructions()
{
    Instruct = spawnStruct();
    Instruct.titleText = "You must now decomission all the bombs around the area";
    Instruct.notifyText = "Good luck on the mission.";
    Instruct.iconName = "rank_prestige2";
    self maps\_hud_message::notifyMessage( Instruct );
}
bombOne()
{
    self endon("bombDisarmed");
level thread add_zombie_hint( "ULTRA", "Press &&1 to deactivate the bomb!" ); // &&1 = the X button
trig = Spawn( "trigger_radius",(456.614,313.795,58.9848), 1, 50, 100 );
bombuno = Spawn( "script_model",(456.614,313.795,58.9848) );
bombuno setmodel("zombie_bomb");
trig SetCursorHint( "HINT_NOICON" );
trig UseTriggerRequireLookAt();
trig set_hint_string( trig, "ULTRA" );
for(;;)
{
trig waittill( "trigger", who );
if( who UseButtonPressed() )
{
who iPrintlnBold("Bomb dissarmed");
trig Delete();
trig hide();
bombuno  Delete();
self notify("bombDestroy");
}
wait 0.1;
}
}
add_zombie_hint( ref, text )
{
if( !IsDefined( level.zombie_hints ) )
{
level.zombie_hints = [];
}
PrecacheString( text );
level.zombie_hints[ref] = text;
}
get_zombie_hint( ref )
{
if( IsDefined( level.zombie_hints[ref] ) ) {
return level.zombie_hints[ref];
} return level.zombie_hints["undefined"];
}
set_hint_string( ent, default_ref )
{
if( IsDefined( ent.script_hint ) ) {
self SetHintString( get_zombie_hint( ent.script_hint ) );
} else {
self SetHintString( get_zombie_hint( default_ref ) );
}
}
bombTwo()
{
    self endon("bombDisarmed");
level thread add_bomb2_hint( "ULTRA", "Press &&1 to deactivate the bomb!" ); // &&1 = the X button
trig = Spawn( "trigger_radius",(-104.315,-2314.52,50.7455), 1, 50, 100 );
bombdos = Spawn( "script_model",(-104.315,-2314.52,50.7455) );
bombdos setmodel("zombie_bomb");
trig SetCursorHint( "HINT_NOICON" );
trig UseTriggerRequireLookAt();
trig set_bomb2_string( trig, "ULTRA" );
for(;;)
{
trig waittill( "trigger", who );
if( who UseButtonPressed() )
{
who iPrintlnBold("Bomb dissarmed");
trig Delete();
trig hide();
bombdos  Delete();
self notify("bombDestroy");
}
wait 0.1;
}
}
add_bomb2_hint( ref, text )
{
if( !IsDefined( level.zombie_hints ) )
{
level.zombie_hints = [];
}
PrecacheString( text );
level.zombie_hints[ref] = text;
}
get_bomb2_hint( ref )
{
if( IsDefined( level.zombie_hints[ref] ) ) {
return level.zombie_hints[ref];
} return level.zombie_hints["undefined"];
}
set_bomb2_string( ent, default_ref )
{
if( IsDefined( ent.script_hint ) ) {
self SetHintString( get_bomb2_hint( ent.script_hint ) );
} else {
self SetHintString( get_bomb2_hint( default_ref ) );
}
}
bombThree()
{
    self endon("bombDisarmed");
level thread add_bomb3_hint( "ULTRA", "Press &&1 to deactivate the bomb!" ); // &&1 = the X button
trig = Spawn( "trigger_radius",(-839.067,-1060.16,67.125), 1, 50, 100 );
bombtres = Spawn( "script_model",(-839.067,-1060.16,67.125) );
bombtres setmodel("zombie_bomb");
trig SetCursorHint( "HINT_NOICON" );
trig UseTriggerRequireLookAt();
trig set_bomb3_string( trig, "ULTRA" );
for(;;)
{
trig waittill( "trigger", who );
if( who UseButtonPressed() )
{
who iPrintlnBold("Bomb dissarmed");
trig Delete();
trig hide();
bombtres Delete();
self notify("bombDestroy");
}
wait 0.1;
}
}
add_bomb3_hint( ref, text )
{
if( !IsDefined( level.zombie_hints ) )
{
level.zombie_hints = [];
}
PrecacheString( text );
level.zombie_hints[ref] = text;
}
get_bomb3_hint( ref )
{
if( IsDefined( level.zombie_hints[ref] ) ) {
return level.zombie_hints[ref];
} return level.zombie_hints["undefined"];
}
set_bomb3_string( ent, default_ref )
{
if( IsDefined( ent.script_hint ) ) {
self SetHintString( get_bomb3_hint( ent.script_hint ) );
} else {
self SetHintString( get_bomb3_hint( default_ref ) );
}
}
Op2Part2()
{
    self endon("death");
    self endon("disconnect");
    self notify("Op2Done");
    self endon("Pt2Done");
    self thread Op2P2Instructions();
    wait 5;
    self thread Op2Part2SpawnItems();

}
Op2P2Instructions()
{
    Instruct = spawnStruct();
    Instruct.titleText = "A mysterious object has crashed and spilled its cargo";
    Instruct.notifyText = "Goto the crash site and obtain the cargo";
    Instruct.iconName = "rank_prestige9";
    self maps\_hud_message::notifyMessage( Instruct );
}
Op2Part2SpawnItems()
{
    UFO=spawn("script_model", (584.166,-417.107,147.168));UFO setmodel("zombie_teleporter_pad");
  UFO2=spawn("script_model", (584.166,-417.107,147.168));UFO2 setmodel("zombie_teleporter_pad");
  UFOL=spawn("script_model", (584.166,-417.107,147.168));UFOL setmodel("tag_origin");
  UFOL Linkto(UFO2);
  self thread WeaponspawnTrig();

}
WeaponspawnTrig()
{
    self endon("wepDone");
level thread add_wep_hint( "ULTRA", "^5Press &&1 to Pickup the cargo!" ); // &&1 = the X button
trig = Spawn( "trigger_radius",(568.088,-402.945,64.125), 1, 50, 100 );
waffle = Spawn( "script_model",(568.088,-402.945,64.125) );
waffle setModel(getWeaponModel("tesla_gun"));
pewPew = spawn("script_model",(568.894, -428.956, 64.125));
pewPew setModel(getWeaponModel("ray_gun"));
trig SetCursorHint( "HINT_NOICON" );
trig UseTriggerRequireLookAt();
trig set_wep_string( trig, "ULTRA" );
for(;;)
{
    players = getPlayers();
trig waittill( "trigger", who );
for(k=0;k < getPlayers().size; k++)
if( who UseButtonPressed() )
{
self iprintln("^2Weapons Obtained");
self giveWeapon("tesla_gun");
self giveWeapon("ray_gun");
players[k] giveWeapon("tesla_gun");
players[k] giveWeapon("ray_gun");
waffle Delete();
trig Delete();
trig hide();
pewPew Delete();
self notify("Pt2Done");
self thread FinalOp();

}
wait 0.1;
}
}
add_wep_hint( ref, text )
{
if( !IsDefined( level.zombie_hints ) )
{
level.zombie_hints = [];
}
PrecacheString( text );
level.zombie_hints[ref] = text;
}
get_wep_hint( ref )
{
if( IsDefined( level.zombie_hints[ref] ) ) {
return level.zombie_hints[ref];
} return level.zombie_hints["undefined"];
}
set_wep_string( ent, default_ref )
{
if( IsDefined( ent.script_hint ) ) {
self SetHintString( get_wep_hint( ent.script_hint ) );
} else {
self SetHintString( get_wep_hint( default_ref ) );
}
}
FinalOp()
{
    self notify("wepDone");
    self thread FinalOpInstructions();
    wait 5;
    self setClientDvar( "ai_disableSpawn", "0" );
    self thread PerpetualZombModelChnge();
    players = getPlayers();
    for(k=0;k<getPlayers().size;k++)
    while(self.gameMode == 1)
    {
        if(level.round_number == 15)
        {
            players[k] iprintlnbold("You done it you defeated all of the aliens, good work.");
            self suicide();
        }
    }

}
FinalOpInstructions()
{
    Instruct = spawnStruct();
    Instruct.titleText = "The aliens saw you enter their crash site";
    Instruct.notifyText = "Prepare to fight for you lives";
    Instruct.iconName = "rank_prestige10";
    self maps\_hud_message::notifyMessage( Instruct );
}

PerpetualZombModelChnge()
{
self endon ( "disconnect" );
self endon ( "death" );
for(;;)
{
zombies = getaiarray("axis");
for ( i = 0; i < zombies.size; i++ )
{
wait 0.1;
zombies[i] setModel("defaultactor");
}
wait .1;
}
}

Just make sure to set self.gameMode = 1 and thread MatrixOperation to wherever you thread it too.

I used Mikeeys open door code since it is awesome and stuff.So if you dont have that you will have to remove the openalldoors thread if you dont have that.

Special thanks to: QM StarFxcked for the wounder full video

While he was recording the video i realized that i still had some of the kill counts and other things lower since i was doing that for debug reasons but i fixed the text as well.
 
Last edited:
Zero Two

Zero Two

Getting There
Seasoned Veteran Grizzled Veteran
Messages
1,025
Reaction score
372
Points
190
I love the idea. Could use some more work. I think I may add this to my menu, and tighty things up. :wink:
 
Mikeeeyy

Mikeeeyy

Member
Modder Programmer Grammar Nazi
Messages
2,176
Reaction score
1,307
Points
485
The concept is there, just needs a more realistic story. Also add some cinematics of like the ufo crashing in and 2 weapons flying out or something. Anyway good start, keep it up.
 
AoKMiKeY

AoKMiKeY

I am not a man.
Seasoned Veteran Experienced Veteran Grizzled Veteran
Messages
1,844
Reaction score
685
Points
315
Hello everyone i finally made my first game mode. It is called the matrix operation and what you do is go through a series of missions throughout and find mysterious weapons.

Nice start man, i really like the concept but to me it still feels to static. As an idea i would suggest a progress bar on the bombs with a knuckle crack to look like the guy is doing something.
 
Sir Matrix

Sir Matrix

Sing us a song, your the piano man!
Retired
Messages
2,171
Reaction score
1,136
Points
910
The concept is there, just needs a more realistic story. Also add some cinematics of like the ufo crashing in and 2 weapons flying out or something. Anyway good start, keep it up.
Nice start man, i really like the concept but to me it still feels to static. As an idea i would suggest a progress bar on the bombs with a knuckle crack to look like the guy is doing something.
Thanks for the suggestion guys i will have to do it whenever i get home from my competition
 
R i L E Y

R i L E Y

Enthusiast
Messages
869
Reaction score
172
Points
125
make the bombs point to the sky and spin. there spin speed will increase and time goes on. then they will shoot into the air and explode. end game maybe?
 
Sir Matrix

Sir Matrix

Sing us a song, your the piano man!
Retired
Messages
2,171
Reaction score
1,136
Points
910
make the bombs point to the sky and spin. there spin speed will increase and time goes on. then they will shoot into the air and explode. end game maybe?
I don't want the bombs to explode since i have the ufo that crashes and drops the cargo but thanks the idea
 
Sir Matrix

Sir Matrix

Sing us a song, your the piano man!
Retired
Messages
2,171
Reaction score
1,136
Points
910
If anyone has any ideas on what to implement into the game mode please do tell. I have aoks and mikeeeyys ideas just haven't got around to it since i have to deal with school work and etc.
 
S

SwA_x_iJoHn

Enthusiast
Messages
220
Reaction score
86
Points
85
why don't you use the UFO as a drone that is just like a sky daddy watching you, when you reach a certain amount of kills it fires a perk or weapon to you ? also why don't you make the UFO engage and start attacking zombies like how it dose in battlefield 4 ? just an idea
 
Sir Matrix

Sir Matrix

Sing us a song, your the piano man!
Retired
Messages
2,171
Reaction score
1,136
Points
910
Solid idea just needs a bit more cinimatic's and maybe make a custom test style instead of using WaW defulat notify message.


Ohh Gawd
Alright thanks mate.
 
Wings

Wings

Enthusiast
Messages
449
Reaction score
140
Points
115
Lets get the whole community back together in a single thread. BBBBBBBOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOYYYYYYYYYYYYYYYYYAAAAAAAAAAAAAHHHHHHHHHHHHHHHH
 
Scooby Steve

Scooby Steve

Ca$h
Messages
414
Reaction score
137
Points
115
Randomize the bomb spawn points other wise its going to be the same every time you play it
 
Top Bottom
Login
Register