Let’s dip our toes into the waters of scripting, or coding, or programming — they all mean the same thing:
I don’t have any code for your to “copy and paste” because it’s better for your brain if you follow along and type on your screen what you see me type. Plus, the script we’re going to create is less than 10 lines long, so you should be okay. 😉
Scripting, Part 1 of 2, 6:55
Scripting Part 2 of 2, 5:06
In the last minute of that video I made not one, but TWO mistakes. Instead of editing them out and retaining my appearance of infallibility, I left them in to point out…
No matter how much game development experience you have (and I have more than a little) you will always make mistakes. Forget to check a box. Put the wrong tag on an object. And so on. Don’t let it get you down, just keep cranking away on it and over time the mistakes happen less and less.
For bonus “You’re Smart!” points, what could I have done differently to make sure those mistakes didn’t happen? Sure, taking a nap earlier in the day might have helped, but I also could have (should have!) dragged the first coin from the Hierarchical pane down into the Prefabs folder. By creating a prefab I would have been able to drag another coin — already configured correctly — into the scene.
Prefabs are your friend!
Back to the Bouncing and Sliding Dashboard