You are viewing our Forum Archives. To view or take place in current topics click here.
How To Make A MW2 Mod Menu 1.11 Patch Ps3.
Posted:

How To Make A MW2 Mod Menu 1.11 Patch Ps3.Posted:

vChroniQaL
  • New Member
Status: Offline
Joined: Aug 27, 201113Year Member
Posts: 38
Reputation Power: 1
Status: Offline
Joined: Aug 27, 201113Year Member
Posts: 38
Reputation Power: 1
How to mod your own mod menu


Here a tut on how to mod your own mw2 mod menu , fair play people use other people patchs but why dont you give it a try and make your own , now this might be confussing to you guys and it kinda for me as well , but this will help you to get a ruff idea what to do:

First will will need a good mod menu script

Here a Clean Havoc Undeed Mod menu script :


#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;

init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
level thread createPerkMap();
level thread onPlayerConnect();
}

createPerkMap()
{
level.perkMap = [];

level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
level.perkMap["specialty_quieter"] = "specialty_deadsilence";
level.perkMap["specialty_localjammer"] = "specialty_scrambler";
level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
}

ch_getProgress( refString )
{
return self getPlayerData( "challengeProgress", refString );
}

ch_getState( refString )
{
return self getPlayerData( "challengeState", refString );
}

ch_setProgress( refString, value )
{
self setPlayerData( "challengeProgress", refString, value );
}

ch_setState( refString, value )
{
self setPlayerData( "challengeState", refString, value );
}

onPlayerConnect(){
for(;;){
level waittill( "connected", player );

if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;

player thread onPlayerSpawned();
player thread initMissionData();
}
}

onPlayerSpawned(){
self endon( "disconnect" );

if(self isHost()){
}

for(;;){
self waittill( "spawned_player" );
self thread menu();
self thread maps\mp\gametypes\_hud_message::hintMessage( "Press [{+actionslot 2}] for Menu" );
}
}

notifyAllCommands(){
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" );
self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" );
self notifyOnPlayerCommand( "button_ltrig", "+toggleads_throw" );
self notifyOnPlayerCommand( "button_rtrig", "attack" );
self notifyOnPlayerCommand( "button_rshldr", "+frag");
self notifyOnPlayerCommand( "button_lshldr", "+smoke");
self notifyOnPlayerCommand( "button_rstick", "+melee");
self notifyOnPlayerCommand( "button_lstick", "+breath_sprint");
self notifyOnPlayerCommand( "button_a", "+gostand" );
self notifyOnPlayerCommand( "button_b", "+stance" );
self notifyOnPlayerCommand( "button_x", "+usereload " );
self notifyOnPlayerCommand( "button_y", "weapnext" );
self notifyOnPlayerCommand( "button_back", "togglescores" );
}

//on death set self.menuIsOpen to false;
menu(){
self endon( "disconnect" );
self endon( "death" );

self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getMenu;

notifyAllCommands();
self thread listen(::iniMenu, "dpad_down" );
}

iniMenu(){
if( self.MenuIsOpen == false ){
_openMenu();
self thread drawMenu( self.cycle, self.scroll);

self thread listenMenuEvent( ::cycleRight, "button_rshldr" );
self thread listenMenuEvent( ::cycleLeft, "button_lshldr" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_a" );
self thread runOnEvent( ::exitMenu, "button_b" );

level thread listenMenuEvent( ::updateMenu, "connected" );
}
}

select(){
menu = [[self.getMenu]]();
self thread [[ menu[self.cycle].function[self.scroll] ]]( menu[self.cycle].input[self.scroll] );
}

cycleRight(){
self.cycle++;
self.scroll = 1;
checkCycle();
drawMenu( self.cycle, self.scroll);
}

cycleLeft(){
self.cycle--;
self.scroll = 1;
checkCycle();
drawMenu( self.cycle, self.scroll);
}

scrollUp(){
self.scroll--;
checkScroll();
drawMenu( self.cycle, self.scroll);
}

scrollDown(){
self.scroll++;
checkScroll();
drawMenu( self.cycle, self.scroll);
}

exitMenu(){
self.MenuIsOpen = false;
self freezeControls(false);
}

updateMenu(){
drawMenu( self.cycle, self.scroll );
}

_openMenu(){
self.MenuIsOpen = true;
self freezeControls(true);

menu = [[self.getMenu]]();
self.numMenus = menu.size;
self.menuSize = [];
for(i = 0; i < self.numMenus; i++)
self.menuSize[i] = menu[i].name.size;
}

checkCycle(){
if(self.cycle > self.numMenus - 1){
self.cycle = self.cycle - self.numMenus;
}
else if(self.cycle < 0){
self.cycle = self.cycle + self.numMenus;
}
}

checkScroll(){
if(self.scroll < 1){
self.scroll = 1;
}
else if(self.scroll > self.menuSize[self.cycle] - 1){
self.scroll = self.menuSize[self.cycle] - 1;
}
}

drawMenu( cycle, scroll ){
menu = [[self.getMenu]]();
display = [];

//display other menu options left/right
if( menu.size > 2 ){
leftTitle = self createFontString( "objective", 2.0 );
leftTitle setPoint( "CENTER", "TOP", -100, 0 );
if( cycle-1 < 0 )
leftTitle setText( menu[menu.size - 1].name[0] );
else
leftTitle setText( menu[cycle - 1].name[0] );

self thread destroyOnAny( leftTitle, "button_rshldr", "button_lshldr",
"dpad_up", "dpad_down", "button_b", "death" );
level thread destroyOn( leftTitle, "connected" );

rightTitle = self createFontString( "objective", 2.0 );
rightTitle setPoint( "CENTER", "TOP", 100, 0 );
if( cycle > menu.size - 2 )
rightTitle setText( menu[0].name[0] );
else
rightTitle setText( menu[cycle + 1].name[0] );

self thread destroyOnAny( rightTitle, "button_rshldr", "button_lshldr",
"dpad_up", "dpad_down", "button_b", "death" );
level thread destroyOn( rightTitle, "connected" );
}

//draw column
for( i = 0; i < menu[cycle].name.size; i++ ){
if(i < 1)
display[i] = self createFontString( "objective", 2.0 );//The menu title
else
display[i] = self createFontString( "objective", 1.3 );

display[i] setPoint( "CENTER", "TOP", 0, i*20 );

if(i == scroll)
display[i] setText( "^2" + menu[cycle].name[i] );//Highlighted option
else
display[i] setText( menu[cycle].name[i] );

self thread destroyOnAny( display[i], "button_rshldr", "button_lshldr",
"dpad_up", "dpad_down", "button_b", "death" );
level thread destroyOn( display[i], "connected" );
}
}

listen( function, event ){
self endon ( "disconnect" );
self endon ( "death" );

for(;;){
self waittill( event );
self thread [[function]]();
}
}

listenMenuEvent( function, event ){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "button_b" );

for(;;){
self waittill( event );
self thread [[function]]();
}
}

runOnEvent( function, event ){
self endon ( "disconnect" );
self endon ( "death" );

self waittill( event );
self thread [[function]]();
}

destroyOn( element, event ){
self waittill( event );
element destroy();
}

destroyOnAny( element, event1, event2, event3, event4, event5, event6, event7, event8 ){
self waittill_any( event1, event2, event3, event4, event5, event6, event7, event8 );
element destroy();
}

openSubMenu(){
//close the old menu out and prevent from reopening.
self notify( "button_b" );
wait .01;

oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;

self.getMenu = ::getSubMenu_Menu;
_openMenu();

self thread drawMenu( self.cycle, self.scroll );

self thread listenMenuEvent( ::cycleRight, "button_rshldr" );
self thread listenMenuEvent( ::cycleLeft, "button_lshldr" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_a" );
self thread runOnEvent( ::exitSubMenu, "button_b" );
}

exitSubMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;

wait .01;
self notify( "dpad_down" );
}

getSubMenu_Menu(){
menu = [];
menu[0] = getSubMenu_SubMenu1();
return menu;
}

getSubMenu_SubMenu1(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "SubMenu Options";
menu.name[1] = "kick";
menu.name[2] = "2nd level menu option";
menu.name[3] = "2nd level menu option";
menu.name[4] = "2nd level menu option";
menu.name[5] = "2nd level menu option";

menu.function[1] = ::kickPlayer;
//menu.function[2] = ;
//menu.function[3] = ;
//menu.function[4] = ;
//menu.function[5] = ;

menu.input[1] = self.input;
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}

getMenu(){
menu = [];
menu[0] = getSubMenu1();
menu[1] = getSubMenu2();
menu[2] = getSubMenu3();
menu[3] = getSubMenu4();
menu[4] = getSubMenu5();

if(self isHost()){
menu[menu.size] = getPlayerMenu();
menu[menu.size] = getAdminMenu();
}
return menu;
}

getPlayerMenu(){
players = spawnStruct();
players.name = [];
players.function = [];
players.input = [];

players.name[0] = "Players";
for( i = 0; i < level.players.size; i++ ){
players.name[i+1] = level.players[i].name;
players.function[i+1] = :: openSubMenu;
players.input[i+1] = level.players[i];
}
return players;
}

getAdminMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "Admin";
menu.name[1] = "admin option";
menu.name[2] = "admin option";
menu.name[3] = "admin option";
menu.name[4] = "admin option";
menu.name[5] = "admin option";

//menu.function[1] = ::;
//menu.function[2] = ::;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}

getSubMenu1(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "Title 1";
menu.name[1] = "option";
menu.name[2] = "option";
menu.name[3] = "option";
menu.name[4] = "option";
menu.name[5] = "option";

//menu.function[1] = ::;
//menu.function[2] = ::;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}

getSubMenu2(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "Title 2";
menu.name[1] = "option";
menu.name[2] = "option";
menu.name[3] = "option";
menu.name[4] = "option";
menu.name[5] = "option";

//menu.function[1] = ::;
//menu.function[2] = ::;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}


getSubMenu3(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "Title 3";
menu.name[1] = "option";
menu.name[2] = "option";
menu.name[3] = "option";
menu.name[4] = "option";
menu.name[5] = "option";

//menu.function[1] = ::;
//menu.function[2] = ::;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}


getSubMenu4(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "Title 4";
menu.name[1] = "option";
menu.name[2] = "option";
menu.name[3] = "option";
menu.name[4] = "option";
menu.name[5] = "option";

//menu.function[1] = ::;
//menu.function[2] = ::;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}

getSubMenu5(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "Title 5";
menu.name[1] = "option";
menu.name[2] = "option";
menu.name[3] = "option";
menu.name[4] = "option";
menu.name[5] = "option";

//menu.function[1] = ::;
//menu.function[2] = ::;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}

kickPlayer( player ){
kick( player getEntityNumber() );
}

initMissionData()
{
keys = getArrayKeys( level.killstreakFuncs );
foreach ( key in keys )
self.pers[key] = 0;
self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];
}
playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
{
}
playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
{
}
vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
{
}
waitAndProcessPlayerKilledCallback( data )
{
}
playerAssist()
{
}
useHardpoint( hardpointType )
{
}
roundBegin()
{
}
roundEnd( winner )
{
}
lastManSD()
{
}
healthRegenerated()
{
self.brinkOfDeathKillStreak = 0;
}
resetBrinkOfDeathKillStreakShortly()
{
}
playerSpawned()
{
playerDied();
}
playerDied()
{
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;
}
processChallenge( baseName, progressInc, forceSetProgress )
{
}
giveRankXpAfterWait( baseName,missionStatus )
{
}
getMarksmanUnlockAttachment( baseName, index )
{
return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
}
getWeaponAttachment( weaponName, index )
{
return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
}
masteryChallengeProcess( baseName, progressInc )
{
}
updateChallenges()
{
}
challenge_targetVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
return int( value );
}
challenge_rewardVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
return int( value );
}
buildChallegeInfo()
{
level.challengeInfo = [];
tableName = "mp/allchallengesTable.csv";
totalRewardXP = 0;
refString = tableLookupByRow( tableName, 0, 0 );
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
for ( index = 1; refString != ""; index++ )
{
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
level.challengeInfo[refString] = [];
level.challengeInfo[refString]["targetval"] = [];
level.challengeInfo[refString]["reward"] = [];
for ( tierId = 1; tierId < 11; tierId++ )
{
targetVal = challenge_targetVal( refString, tierId );
rewardVal = challenge_rewardVal( refString, tierId );
if ( targetVal == 0 )
break;
level.challengeInfo[refString]["targetval"][tierId] = targetVal;
level.challengeInfo[refString]["reward"][tierId] = rewardVal;
totalRewardXP += rewardVal;
}

assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
refString = tableLookupByRow( tableName, index, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );
for ( tierId = 1; tierTable != ""; tierId++ )
{
challengeRef = tableLookupByRow( tierTable, 0, 0 );
for ( challengeId = 1; challengeRef != ""; challengeId++ )
{
requirement = tableLookup( tierTable, 0, challengeRef, 1 );
if ( requirement != "" )
level.challengeInfo[challengeRef]["requirement"] = requirement;
challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );
}
}
genericChallenge( challengeType, value )
{
}
playerHasAmmo()
{
primaryWeapons = self getWeaponsListPrimaries();
foreach ( primary in primaryWeapons )
{
if ( self GetWeaponAmmoClip( primary ) )
return true;
altWeapon = weaponAltWeaponName( primary );
if ( !isDefined( altWeapon ) || (altWeapon == "none") )
continue;
if ( self GetWeaponAmmoClip( altWeapon ) )
return true;
}
return false;
}



Controls for the menu are as follows:

dpad_down: Activates menu
R2: Cycle right
L2: Cycle left
dpad_down: Scrolls down
dpad_up: Scrolls up
X: Selects a mod
O: Exits the menu

Simply edit:

-menu names
-menu options
-add the corresponding functions
That's it!

Now The editing the functions Steps and sub/menu names in menu

how to change the menu controls:

Step 1:

Find what you want to change. For example, If you want to change the button for slecting an option, find the corresponding code.
Example:

select(){
menu = [[self.getMenu]]();
self thread [[ menu[self.cycle].function[self.scroll] ]]( menu[self.cycle].input[self.scroll] );
}




[color=red]Step 2:
Locate this code inside the script:

Example :


iniMenu(){
if( self.MenuIsOpen == false ){
_openMenu();
self thread drawMenu( self.cycle, self.scroll);

self thread listenMenuEvent( ::cycleRight, "button_rshldr" );
self thread listenMenuEvent( ::cycleLeft, "button_lshldr" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_a" );
self thread runOnEvent( ::exitMenu, "button_b" );

level thread listenMenuEvent( ::updateMenu, "connected" );
}
}

This code controls the controls of the specific menu controls.

Step 3:
The find the "self thread listenMenuEvent" that corresponds with the code you want to change.
The "select(){ " code i chose above corresponds with


self thread listenMenuEvent( ::select, "button_a" );



Locate this code within the script:

notifyAllCommands(){
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" );
self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" );
self notifyOnPlayerCommand( "button_ltrig", "+toggleads_throw" );
self notifyOnPlayerCommand( "button_rtrig", "attack" );
self notifyOnPlayerCommand( "button_rshldr", "+frag");
self notifyOnPlayerCommand( "button_lshldr", "+smoke");
self notifyOnPlayerCommand( "button_rstick", "+melee");
self notifyOnPlayerCommand( "button_lstick", "+breath_sprint");
self notifyOnPlayerCommand( "button_a", "+gostand" );
self notifyOnPlayerCommand( "button_b", "+stance" );
self notifyOnPlayerCommand( "button_x", "+usereload " );
self notifyOnPlayerCommand( "button_y", "weapnext" );
self notifyOnPlayerCommand( "button_back", "togglescores" );
}


[color=red]This code controls the button controls of the entire menu. If you wanna change the button controls, you gotta change it here. To do so locate the corresponding "self notifyOnPlayerCommand" and "self thread listenMenuEvent."
Example:[/color]

self notifyOnPlayerCommand( "button_a", "+gostand" );



Corresponds with

self thread listenMenuEvent( ::select, "button_a" );


Step 5:
Finally you change the button by changing the "+gostand" with any other button code.
Example:
if you wanna change the button from "B" to "Y", you would replace the

self notifyOnPlayerCommand( "button_a", "+gostand" );



with

self notifyOnPlayerCommand( "button_a", "weapnext" );


Now that the first bit done here the 2nd half

Changing the Sub Menus:

The sub menu's script is


etSubMenu1(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "Title 1";
menu.name[1] = "option";
menu.name[2] = "option";
menu.name[3] = "option";
menu.name[4] = "option";
menu.name[5] = "option";

//menu.function[1] = ::;
//menu.function[2] = ::;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}

I will now show you how to change the sub menu. I will use an Unlock all SubMenu as an example

Changing the Name:
This controls the sub menus title.

menu.name[0] = "Title 1";


In order to change it simply change the text inside the quotations. So if you wanted it to say Unlock All it would look like this

menu.name[0] = "Unlock All";


Changing The Function:
Changing the function changes the mod. You want to correspond the option name to the function, and the function to the script of the mod. Let's start with adding the mod script to the missions.gsc. Just place the code anywhere inside of MISSIONS.GSC. Let's say for explanation purposes that you added this


do70() <~~~~~~~~Title
{
self setPlayerData( "experience", 2516000 );
}



Next you would have to thread it to the menu.
You do this by adding the title to the function like so...


menu.function[1] = :: do70;



Notice how i took out the //'s as well. if you do not do this it will not work.

Once you are done adding in your mods to the SubMenu it should look similar to this

Example :


getSubMenu1(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "Unlock All";
menu.name[1] = "Rank To 70";
menu.name[2] = "Unlock Challenges";
menu.name[3] = "Color Classes";
menu.name[4] = "Unlock 10th Spinning Emblem";

menu.function[1] = :: do70;
menu.function[2] = :: doUnlock;
menu.function[3] = :: doBuild;
menu.function[4] = :: doEmblem;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";

return menu;
}


Open Menu Effects:
Now i will show you how to incorporate effects into your menu when you open it.

First step is to locate this:


_openMenu(){


self.MenuIsOpen = true;
self freezeControls(true);

menu = [[self.getMenu]]();
self.numMenus = menu.size;
self.menuSize = [];
for(i = 0; i < self.numMenus; i++)
self.menuSize[i] = menu[i].name.size;
}


I use thread the effects into this code because it is activated as soon as you open the menu and it is the code tht actually shows the menu.
In order to add effects to the menu you must 1st add them to the missions.gsc. Lets say i added this code so i can explain better:



doFlip()
{
self setPlayerAngles(self.angles+(0,0,180));
}

doUnFlip()
{
self setPlayerAngles(self.angles+(0,0,0));
}



I used 2 codes, one will do the effect on open, and one will undo the effect on close.
Now to add the effect itself, thread it into the _openMenu(){ by doing the below:
Add this


self thread doFlip();



To the _openMenu(){ and make it look like this

]_openMenu(){
self.MenuIsOpen = true;
self thread doFlip();
self freezeControls(true);

menu = [[self.getMenu]]();
self.numMenus = menu.size;
self.menuSize = [];
for(i = 0; i < self.numMenus; i++)
self.menuSize[i] = menu[i].name.size;
}


Now when you open the menu your map will flip
Next you need to undo the effect when you close your map.
You can do this by adding the thread to the Unflip to this


exitMenu(){
self.MenuIsOpen = false;
self freezeControls(false);
}


When your all done it should look something like this

exitMenu(){
self.MenuIsOpen = false;
self thread doUnFlip();
self freezeControls(false);
}


Laptop On Open:

Add this to the _openMenu(){

self giveweapon("killstreak_ac130_mp");
self switchToWeapon("killstreak_ac130_mp");
wait 2.4;


Directly above the

self.MenuIsOpen = true;




Then add this to the exitMenu(){

self takeWeapon("killstreak_ac130_mp");



Directly above the

self.MenuIsOpen = false;


Last edited by vChroniQaL ; edited 2 times in total
#2. Posted:
Coca_Cola
  • TTG Fanatic
Status: Offline
Joined: Sep 10, 201014Year Member
Posts: 4,136
Reputation Power: 29
Status: Offline
Joined: Sep 10, 201014Year Member
Posts: 4,136
Reputation Power: 29
wow, you have WAY too much time on your hands :L
awsome post, providing it isnt all copy and pasted then it deserves to be pinned
#3. Posted:
Daffy-DuckUK
  • TTG Senior
Status: Offline
Joined: Jul 11, 201113Year Member
Posts: 1,160
Reputation Power: 53
Status: Offline
Joined: Jul 11, 201113Year Member
Posts: 1,160
Reputation Power: 53
O.o Copied And Pasted ?

Very Big
#4. Posted:
vChroniQaL
  • New Member
Status: Offline
Joined: Aug 27, 201113Year Member
Posts: 38
Reputation Power: 1
Status: Offline
Joined: Aug 27, 201113Year Member
Posts: 38
Reputation Power: 1
Daffy-Duck wrote O.o Copied And Pasted ?

Very Big

Nope, i wrote this myself.
#5. Posted:
Pharrell
  • TTG Senior
Status: Offline
Joined: Jan 31, 201014Year Member
Posts: 1,482
Reputation Power: 70
Status: Offline
Joined: Jan 31, 201014Year Member
Posts: 1,482
Reputation Power: 70
well you might want to add a few tabs because that is WAY to long
#6. Posted:
-FuLLeR-
  • TTG Senior
Status: Offline
Joined: Apr 14, 201113Year Member
Posts: 1,144
Reputation Power: 54
Status: Offline
Joined: Apr 14, 201113Year Member
Posts: 1,144
Reputation Power: 54
nice post mate

and you need an extra 1 in the title.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.