Project 536: Skyjumper

3. (Group Activity) Changing variables and properties in Lua

We know how to add to variables in Scratch, but how do we do it in a totally different language?
This challenge doesn't have a starting point

Steps

1. What does adding to variables look like?

When you add to variables in Lua, a lot of times you'll make a variable equal to itself PLUS a number. So:

  • Player.Height = Player.Height + 5

Would add 5 to the player's height.

  • NanoTheRobot.Speed = NanoTheRobot.Speed + 12

Adds 12 to Nano the robot's speed

2. How would we write these?

These are silly examples, and there's not really a right answer, but try imagining if these were written in Lua code. Type your ideas to the chat.

  • How would you make your own hair grow 40 inches?
  • How would you add 100 to your running speed?
  • How would you SUBTRACT 1 inch from your height?