Intro to 3D Game Development

0 of 193 lessons complete (0%)

Scripting Part 2: Making Code Respond to Players

Testing: Write the Code to Close the Chest Lid

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

To test out the code, we will set it up so that the tick function only calls openChest when the chest is NOT open, and otherwise calls the closeChest function. After that, we just need to reset the elapsedTime and temporarily have the openChest function call the startOpeningLidAnimation function as soon as the open animation finishes.