Working with Variables
to Create Quests & NPCs
Working with Variables
to Create Quests & NPCs
Keep working with Microsoft's Make Code.
Today, we'll use concepts from previous classes,
as well as learn new ones to create a quest from an NPC.
Completed
Basics of HTML & CSS
Block-based Programming
Today
Update your .html MakeCode Learning page
Continue Microsoft MakeCode
Upcoming
More HTML
Basics of Programming
No Typing today
If you didn't get to this part yesterday, then work on it today.
Today, we'll talk a bit about variables and use them in order to create an NPCs that will give us a quest. In order to complete the quest, we'll have to use variables to keep track of whether or not the player has recieved the quest, as well as how far along they are in completing the quest.
Part 1
Basic Setup
First, let's look at the basic setup for the map. I don't go over all of this, as y'all have already learned most of this part. Make a map design however you'd like. You can also choose your own sprites.
Follow along with the video here.
Part 2
Creating our NPC
Next, we'll create our NPC and have them give our player the quest. We'll use a conditional IF block so our player doesn't get stuck in an infinite loop of quest requests.
Follow along with the video here.
Part 3
Making the Quest
Now we need to keep track of how many fish we've rescued. We'll use another variable for that.
Follow along with the video here.
Part 4
Finishing the Quest
Let's finish everything and test to make sure everything works...
Follow along with the video here.
Complete the tutorial, customize and go beyond the basic build, then make a video showing what you created.
Maybe you could add multiple quests? Or a time limit? Fish can't live out of water forever...
Maybe there are enemies chasing you... Experiment, be creative.