Back to Browse

Y6T2 - Microsoft MakeCode Arcade - Pt4 - Variables

40 views
Jan 9, 2026
23:08

Part 4: Conditionals, Variables & RPG Mechanics 🎲 Description: Welcome to Part 4! Today, we are adding "Game Brains" to our project. We are using Variables and If/Else Logic to create a system where your choices actually change how the game feels. 🧠 WHAT WE ARE LEARNING: Functions: How to "tidy up" your code by grouping the Intro Sequence into a single block called Start. Enemy AI: Creating an "Influencer" sprite that constantly follows you using the Follow block. The Overlap Event: Triggering a conversation when the Influencer catches you. Risk & Reward: If you Buy: Lose 1 Life (Health goes down). If you Pass: Gain 1 Life + Score Points + Destroy the Enemy. Dynamic Difficulty: Using a Forever loop to change your Player Speed based on your Health (e.g., Low Health = Slower Movement). 💡 CODING TIP: If you get an error saying "Variable myEnemy is never assigned," check your block order! You must create the sprite before you tell it to follow something.

Download

1 formats

Video Formats

360pmp431.1 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Y6T2 - Microsoft MakeCode Arcade - Pt4 - Variables | NatokHD