Game Dev 1_ Lesson 3 - Spawnable Properties
Game Dev 1_ Lesson 3 - Spawnable Properties
Game Development 1
Quest #3
Spawnable Properties
Quest #3
By the end of my quest, I will
be able to…
Notice a pattern?
objectName.propertyName
Assigning Properties to New Values
Sometimes you will need to assign properties to new values:
Notice a pattern?
objectName.propertyName = new value
Warm-Up Activity:
Imagine you are creating a
game where you need to set
your hero’s max health value to
450 instead of the default 350.
What statements would you
write in order to spawn Lady
Ida Justheart into the scene and
immediately update her max
health value to 450? type = “champion”
Warm-Up Activity: Solution
To Game Dev Island!
1 game.addDefeatGoal()
2 game.addSurviveGoal()
3 player = game.spawnPlayerXY(...)
Play Levels
Game Dev 1 Levels 12 - 17
Bonus Activities:
Level 3 of Hour of Play: https://hourofcode.com/ccplay
Need Help?
Always try it once before asking for help.
Summary of Key Terms
● Property: A variable that describes a particular
characteristic of an object.
What I noticed:
-What did you notice as you played through the levels?
-Did you discover or learn something new?
15
Any Questions?
16
Wrap Up
These are all instances of what object
type?
Instances