You are viewing our Forum Archives. To view or take place in current topics click here.
CoolBunny1234 | TTG_iRaaTeD Coding Help Thread
Posted:

CoolBunny1234 | TTG_iRaaTeD Coding Help ThreadPosted:

coolbunny1234
  • Summer 2020
Status: Offline
Joined: Aug 09, 200914Year Member
Posts: 6,491
Reputation Power: 8063
Motto: The Original Bunny
Motto: The Original Bunny
Status: Offline
Joined: Aug 09, 200914Year Member
Posts: 6,491
Reputation Power: 8063
Motto: The Original Bunny
[ Register or Signin to view external links. ]





Learn to code Here





This thread is designed to help the users on TTG with their coding knowledge in various ways. In this thread, if you have a question about a code, how to use it, or anything related, just post your question and we will answer. This thread is not for help with:

-Making Mod Menus
-Removing Gamertag Checks
-Adding Your Gamertag To The Startup Message
-Adding Options to your menu (we will show you how to do it, but we won't do it for you)

Do NOT ask iRaated or myself to help you with the above.




[ Register or Signin to view external links. ]





Please post any question that you have about coding in general below. We will do our best to answer your question and explain it so you understand. We will show you what to do, but we will not do it for you.




How To Edit V4.02 (Use As A Reference For Any Mod Menu)

  ========================================================================================
 Menu Explanation.
 ========================================================================================
 ----------------------------------------------------------------------------------------
 level.topLevelMenuOptions = X;
  X = The Number Of Sub Menu's you have.
  Example: level.topLevelMenuOptions = 2;
   The layout provided has 2 submenu's, 0 through 1, totaling 2.
 ----------------------------------------------------------------------------------------
 level.topLevelMenuNames[X] = "Y";
  X = Sub Menu Number.
  Example: Sub Menu 1 = 0
   sub Menu 2 = 1
   Sub Menu 3 = 2
   Sub Menu 4 = 3
   Sub Menu 5 = 4
   Sub Menu 6 = 5
   And so on and so forth.
  Y = The Name Of Your Submenu
  Example: level.topLevelMenuNames[0] = "Test";
 ----------------------------------------------------------------------------------------
 level.subMenuNumOptions[X] = Y;
  X = Sub Menu Number.
  Example: Sub Menu 1 = 0
   sub Menu 2 = 1
   Sub Menu 3 = 2
   Sub Menu 4 = 3
   Sub Menu 5 = 4
   Sub Menu 6 = 5
   And so on and so forth.
  Y = Number of options in your submenu.
  Example: Basically, if you want 5 Menu options, Y = Desired Amount of Options + 1
   If you want 10 Options In your submenu, you would number them 0-10,
   totaling 11 (Include 0 when counting to 10). So Y = 11
    level.subMenuNumOptions[0] = 11;
   If you want 5 Options in your submenu, you would number them 0-6,
   totaling 5. So Y = 6
   level.subMenuNumOptions[0] = 6;
 ----------------------------------------------------------------------------------------
 level.subMenuNames[X][Y] = "Z";
  X = Sub Menu Number.
  Example: Sub Menu 1 = 0
   sub Menu 2 = 1
   Sub Menu 3 = 2
   Sub Menu 4 = 3
   Sub Menu 5 = 4
   Sub Menu 6 = 5
   And so on and so forth.
   level.subMenuNames[0][X] = "Z";
  Y = Sub Menu Option Number
  Example: Sub Menu Option 1 = 0
   sub Menu Option 2 = 1
   Sub Menu Option 3 = 2
   Sub Menu Option 4 = 3
   Sub Menu Option 5 = 4
   Sub Menu Option 6 = 5
   And so on and so forth.
   level.subMenuNames[0][0] = "Z";
  Z = Sub Menu Option Name
  Example: Set Prestige to 11
   level.subMenuNames[0][0] = "Prestige 11";
 ----------------------------------------------------------------------------------------
 level.subMenuFunctions[X][Y] = :: Z;
  X = Sub Menu Number.
  Example: Sub Menu 1 = 0
   sub Menu 2 = 1
   Sub Menu 3 = 2
   Sub Menu 4 = 3
   Sub Menu 5 = 4
   Sub Menu 6 = 5
   And so on and so forth.
   level.subMenuFunctions[0][Y] = :: Z;
  Y = Sub Menu Option Number
  Example: Sub Menu Option 1 = 0
   sub Menu Option 2 = 1
   Sub Menu Option 3 = 2
   Sub Menu Option 4 = 3
   Sub Menu Option 5 = 4
   Sub Menu Option 6 = 5
   And so on and so forth.
   level.subMenuFunctions[0][0] = :: Z;
  Z = Sub Menu Option Thread
  Example: So this is where you would thread your mod. Say you want to thread a
   code to activate flame vision. We will call it FlameVision(). So in
   the .gsc, do this.
   FlameVision()
   {
   Code here.
   }
   Then go back up to the menu functions, and for Z, put FlameVision; and
   Bam! It's threaded.
   level.subMenuFunctions[0][0] = :: FlameVision;
 ----------------------------------------------------------------------------------------
 level.subMenuInputs[X][Y] = "Z";
  Inputs (or Arrays) can be a bit tricky. Basically, it saves alot of room for repetitive threading.
  Would you rather thread a code for each prestige, or thread one code that does all the prestiges?
  So the only time that you would replace Z with something is when you want an array.
  Most of the time: level.subMenuInputs[0][0] = "";
  Arrays Only (Must be used with Array Code): level.subMenuInputs[0][0] = "Z";
  So lets break this down and use the function Prestige as an example.
  An array Prestige code:
 Prestige( num )
 {
  self maps\_challenges_coop::statSet( "plevel", num );
  self maps\_challenges_coop::statSet( "rank", 65 );
  self iPrintln( "You're ^2First ^7Prestige" );
 }
 
  Notice the num in (). You would thread Prestige( num ) as Prestige. But with num, you
  now add a number in place of Z.
  So Prestige 1
  level.subMenuNames[0][0] = "First Prestige";
  level.subMenuFunctions[0][0] = :: Prestige;
  level.subMenuInputs[0][0] = "1";
  Prestige 2
  level.subMenuNames[0][1] = "First Prestige";
  level.subMenuFunctions[0][1] = :: Prestige;
  level.subMenuInputs[0][1] = "2";
 And so on and so forth.
 
 Stay away from arrays if they confuse you.
 ----------------------------------------------------------------------------------------
 ========================================================================================





Ask Away











Last edited by coolbunny1234 ; edited 10 times in total

The following 56 users thanked coolbunny1234 for this useful post:

R3X (04-13-2012), Luxis (03-12-2012), ant2442 (03-01-2012), TranqulL (02-17-2012), Herp (02-13-2012), biohunter (02-13-2012), Kolakocide (02-08-2012), MW3spanksBF3 (01-31-2012), theMinecraftprogect (01-29-2012), Distribute (01-16-2012), Extricate (12-29-2011), MrHacker99 (12-20-2011), XeJakob (12-18-2011), Hilton (12-17-2011), xXEP1CGiiZMoXx (12-07-2011), BigDaddyRyan (11-27-2011), Whaasup (11-21-2011), StyleCreationz (11-15-2011), COASICKNESS (11-12-2011), pvtpunchu (11-12-2011), ShooterxChick (11-03-2011), xAundre (11-01-2011), Fernando-Torres (10-23-2011), XxMLSxGRxB17xX (10-21-2011), SnakeDevil (10-19-2011), JayPak (10-10-2011), xMeRkSnIpEZz (10-08-2011), -Arkange85 (09-09-2011), bioswrecker (09-04-2011), seedot_ (08-31-2011), Avira (08-17-2011), -Skyline_Jr (08-17-2011), vegeta508 (08-14-2011), Hacz (08-13-2011), wr3k (07-23-2011), Tasty (07-23-2011), Secrets (07-23-2011), GT (07-22-2011), Sea (07-21-2011), MoD_KiinG (07-21-2011), vGoLdeNz (07-20-2011), NashUK (07-20-2011), American_Modz (07-19-2011), Myblindfate (07-18-2011), TTG-Censored (07-18-2011), Stammpede (07-17-2011), SSoHPKC (07-17-2011), TTGBARDEN (07-17-2011), Didact (07-17-2011), the_hillbilly (07-17-2011), IILIMBOII (07-16-2011), Ilusionz (07-16-2011), RaaawR (07-16-2011), Matt (07-16-2011), VeNoMxMoDz (07-16-2011), TTG_iRaaTeD (07-16-2011)
#2. Posted:
TTG_iRaaTeD
  • TTG Contender
Status: Offline
Joined: Aug 06, 201013Year Member
Posts: 3,718
Reputation Power: 187
Status: Offline
Joined: Aug 06, 201013Year Member
Posts: 3,718
Reputation Power: 187
Remember guys keep the stuff realistic. We will help best we can.
#3. Posted:
Synchronized
  • TTG Senior
Status: Offline
Joined: Jan 09, 201113Year Member
Posts: 1,863
Reputation Power: 78
Status: Offline
Joined: Jan 09, 201113Year Member
Posts: 1,863
Reputation Power: 78
Nice Post Will HELP Alot Of ISO Modders Out

!
#4. Posted:
VeNoMxMoDz
  • TTG Addict
Status: Offline
Joined: Oct 23, 201013Year Member
Posts: 2,323
Reputation Power: 133
Status: Offline
Joined: Oct 23, 201013Year Member
Posts: 2,323
Reputation Power: 133
nice thread bunny hopefully people will stop making pointless topics now about small little things i know ill always be trollin this post asnwering questions shhhhh lol
#5. Posted:
RaaawR
  • V5 Launch
Status: Offline
Joined: Dec 11, 201013Year Member
Posts: 2,196
Reputation Power: 107
Status: Offline
Joined: Dec 11, 201013Year Member
Posts: 2,196
Reputation Power: 107
This is like God and Allah combining to make one awesome WaW God, finally a way to stop the spam :nyancat:
#6. Posted:
coolbunny1234
  • Spooky Poster
Status: Offline
Joined: Aug 09, 200914Year Member
Posts: 6,491
Reputation Power: 8063
Motto: The Original Bunny
Motto: The Original Bunny
Status: Offline
Joined: Aug 09, 200914Year Member
Posts: 6,491
Reputation Power: 8063
Motto: The Original Bunny
-RaaawR- wrote This is like God and Allah combining to make one awesome WaW God, finally a way to stop the spam :nyancat:


Who's God and who's Allah?

You're life depends on this answer.
#7. Posted:
Trevor
  • TTG Addict
Status: Offline
Joined: Dec 07, 201013Year Member
Posts: 2,976
Reputation Power: 3412
Status: Offline
Joined: Dec 07, 201013Year Member
Posts: 2,976
Reputation Power: 3412
coolbunny1234 wrote
-RaaawR- wrote This is like God and Allah combining to make one awesome WaW God, finally a way to stop the spam :nyancat:


Who's God and who's Allah?

You're life depends on this answer.

well here is the real question who is jesus?
#8. Posted:
TTG_iRaaTeD
  • TTG Contender
Status: Offline
Joined: Aug 06, 201013Year Member
Posts: 3,718
Reputation Power: 187
Status: Offline
Joined: Aug 06, 201013Year Member
Posts: 3,718
Reputation Power: 187
coolbunny1234 wrote
-RaaawR- wrote This is like God and Allah combining to make one awesome WaW God, finally a way to stop the spam :nyancat:


Who's God and who's Allah?

You're life depends on this answer.

[ Register or Signin to view external links. ]
#9. Posted:
Rented_Lobbys
  • Prospect
Status: Offline
Joined: Apr 11, 201113Year Member
Posts: 649
Reputation Power: 53
Status: Offline
Joined: Apr 11, 201113Year Member
Posts: 649
Reputation Power: 53
nice of you guys doing this
#10. Posted:
RaaawR
  • V5 Launch
Status: Offline
Joined: Dec 11, 201013Year Member
Posts: 2,196
Reputation Power: 107
Status: Offline
Joined: Dec 11, 201013Year Member
Posts: 2,196
Reputation Power: 107
coolbunny1234 wrote
-RaaawR- wrote This is like God and Allah combining to make one awesome WaW God, finally a way to stop the spam :nyancat:


Who's God and who's Allah?

You're life depends on this answer.


I was worried you would say that so I'll let you two decide between you who can be who that way I don't get murdered by someone *9clown*
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.