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 Add a Head Indicator

A Tutorial for Baldi's Basics

No ads for members. Membership is 100% free. Sign up!
Overview
The following tutorial will teach you how to add a head indicator for opening a door, like in Baldi's Basics Kickstarter Exlusive Demo and Baldi's Basic Random Maps Series.

1. Getting Started and UI Stuff

Start by importing all of the textures you need to make the head indicator, preferably the shaking, noticed, and confused sprites. After you imported them and made them transparent by checking "Alpha is Transparency" in the settings of the textures. Create a new Raw Image in the Hud. Apply an Animator to the said raw image. After you did that, create a new AnimatorController. Let's call this "HeadAnimator". Assign it in the "Runtime Animator Controller" slot in your image, and open the Animator window to start animating.



2. Animation

Once you're in the animator window, create three new animation clips. Calling these "HeadIdle", "Notice", and "Confused" are recommended. You'll have to experiment with this next step, but you want to edit the Animation Clips until you're happy with them. Make sure at the end of the "Notice" and "Confused" animations, the Baldi Head disappears or goes off-screen (to do this, click on "Add Property",open the "Transform" menu, and click on the plus arrow next to "Position", and you can animate it sliding off-screen like that.) After you're happy with your clips. Import them into the animator by simply dragging them in. WARNING: The order in which you drag them in is important. You must start by importing the "HeadIdle" animation first. Otherwise, the noticing and confused animations will play once you start the game. Afterwards, make 2 transitions going from the "Any State" box to each of the other animation clips. Make 2 triggers, and called them "notice" and "confused". When you click on the white arrows in the Animator window, you'll see a box with a warning above it. Click the plus sign on the bottom right of the box to add a trigger, and choose the corresponding trigger ("notice" for the noticing animation, and "confused" for the confused animation.) When you're done, your animator window should look like this:



3. Coding

The coding portion is actually really simple, and does not require any complex stuff like IEnumerators. All you have to do for the coding portion is go to BaldiScript and add the variable
"public Animator head" at the bottom. Then, in the "Hear" method, replace the code with:
if (!this.antiHearing && priority >= this.currentPriority)
{
     this.agent.SetDestination(soundLocation);
     this.currentPriority = priority;
     this.head.SetTrigger("notice");
}
else
{
     this.head.SetTrigger("confused");
}

Make sure to assign the Animator of the head in BaldiScript. to do this, left-click on Baldi, find where it says "None (Animator)", drag the Raw Image into the said slot, and it will assign it.

Conclusion

That's about it for this tutorial. I hope this helped you. See you soon.
Sign up to access this!

Embed

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

Credits

Key Authors
TheBaldiModder452 avatar Johnster Space Studio Flag
Affiliation
Johnster Space Studio
TheBaldiModder452 username pic Joined 10mo ago
Offline
422 points Ranked 47846th
13 medals 2 rare
  • Returned 1000 times Medal icon
  • 25 posts awarded Exemplary Feedback Medal icon
  • Returned 100 times Medal icon
  • One month a member Medal icon
  • 1 post awarded Exemplary Feedback Medal icon
  • Thanked 5 submitters Medal icon
Made the tutorial
mystman12
mystman12 Joined 2y ago
Offline
436 points Ranked 47217th
Made BBiEaL
Special Thanks
Basically BHV Ruler Productions Flag
Affiliation
Ruler Productions
Basically BHV Joined 12mo ago
Offline
Ruler Productions Flag Affiliation: Ruler Productions
282 points Ranked 52058th
18 medals 1 legendary 1 rare
  • Returned 5000 times Medal icon
  • Returned 1000 times Medal icon
  • Submission featured Medal icon
  • Returned 100 times Medal icon
  • Became a Studio Leader Medal icon
  • One month a member Medal icon
Asking this question

Submitter

TheBaldiModder452 avatar
TheBaldiModder452 username pic Joined 10mo ago
Absent
422 points Ranked 47846th
13 medals 2 rare
  • Returned 1000 times Medal icon
  • 25 posts awarded Exemplary Feedback Medal icon
  • Returned 100 times Medal icon
  • One month a member Medal icon
  • 1 post awarded Exemplary Feedback Medal icon
  • Thanked 5 submitters Medal icon
TheBaldiModder452 avatar
TheBaldiModder452
Johnster Space Studio Flag
Affiliation
Johnster Space Studio

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
Intermediate

Attributes

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • 4
  • 835
  • 6
  • 17d
  • 17d

More from Submitter

WiPs by Submitter

More Decompile Tutorials