Intro to 3D Game Development

0 of 193 lessons complete (0%)

Scripting Part 1: Moving Objects

Adjust the Variable Value

You don’t have access to this lesson
Please register or sign in to access the course content.

One cool thing that happens when you make a variable on a script is that you can change it from the Entity menu.

  1. Look at the Entity panel, and scroll down until you see the name of your script, ChestScript. Hint: If you can’t find the chest, press the Stop button to bring it back down from the sky.
  2. Click the arrow to expand the script and see that there is a field called Amount To Move Up that matches the amountToMoveUp variable name. 
  3. Change the number here from 10 to 1 to make the chest move more slowly up into the sky.
  4. Save the script and press Play to see the chest move up more slowly.