Step 12: Coding the Lightsaber Off (Part 1)

Goal:


With our lightsaber on and making sounds, we now need to code how to turn it off.

Steps:

  1. From Control, place second IF/THEN block after the first one.
  2. From Math, place an =(equal) sign block into the IF portion of the IF/THEN block, and change it to >(Greater Than).
  3. From the top of our Canvas1.Flung block, find the orange circle labeled yvel and hover over it.
  4. When the menu appears grab the get yvel block and place it in the left side of the >(Greater Than) block.
  5. From Math, place a 0(zero) block into the right side of the >(Greater Than) block.

Code: