Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

How to re-add the YCTP Number Pad

A Tutorial for Baldi's Basics

No ads for members. Membership is 100% free. Sign up!
How to re-add the YCTP Buttons

1: Texturing

Step 1: First off all, you'll need to get the textures for your buttons. And also texture the YCTP to have space for the buttons.

2: Unity
Step 1: Drag&Drop your textures into the Textures2D folder to add your folders to Unity

Step 2: Open the MathGame Prefab (In the "Prefab folder) and make a new GameObject Parent for your buttons

Step 3: Make a new button "UI Section" and in the Transition Dropdown select "Sprite Swap" 

Step 4: In the Image Component for the Sprite select one of your button

Step 5: For the "Pressed Sprite" Select the texture for when its selected. Also do this for the Highlighted sprite

Step 6: Now Simply do this with all your buttons sprites and also position them in different 


3: The OK Button


Now for this button do the same thing like you did for the others buttons but in the add a new event for the "On Click" section. Select for the GameObject the MathGame Object and in the Dropdown go to the "MathGameScript" and then select "OkButton" (You might not have this right now but we'll do this later)

4: Coding

Step 1: Go to the MathGameScript and then make a new void called "OKButton" and then in it simply in the code put "this.CheckAnswer();"

Step 2: Make a new script and in it make a new button variable & a text variable & a reference variable for the MathGameScript (for this tutorial it will be called "playerText". And also at the top put "using UnityEngine.Events and then put in the Start void put "this.button = GetComponent<Button>();"
Step 3: Now make a new void and then in the void put
this.playerText.text += this.text;

Step 4:  Now in the Start void put 
"this.button.On Click = button.AddListener(new UnityAction("void name")); (I might be wrong with this code but if I am it's in the "Basic Button Script"

5: Finishing the OK Button

Step 1: Now go to the OKButton add a new event in the "On Click" and select the MathGame as the GameObject and then in the Dropdown select "MathGameScript" and then select "(Your void name)"

Then there you go! Thanks for reading!
Sign up to access this!

Embed

Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code

Credits

Founder
RealT5mpler
RealT5mpler Joined 11mo ago
Offline
281 points Ranked 53568th
16 medals 4 rare
  • Returned 1000 times Medal icon
  • 25 posts awarded Exemplary Feedback Medal icon
  • Submitted 15 Tutorials Medal icon
  • 50 posts awarded Exemplary Feedback Medal icon
  • One month a member Medal icon
  • Returned 100 times Medal icon

Submitter

RealT5mpler avatar
RealT5mpler Joined 11mo ago
Not on right ok
281 points Ranked 53568th
16 medals 4 rare
  • Returned 1000 times Medal icon
  • 25 posts awarded Exemplary Feedback Medal icon
  • Submitted 15 Tutorials Medal icon
  • 50 posts awarded Exemplary Feedback Medal icon
  • One month a member Medal icon
  • Returned 100 times Medal icon
RealT5mpler
Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

Details

Difficulty Level
Advanced

Attributes

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • 4
  • 1.5k
  • 14
  • 4mo

More from Submitter

WiPs by Submitter

More Decompile Tutorials