Intro to 3D Game Development

0 of 193 lessons complete (0%)

Scripting Part 2: Making Code Respond to Players

Find the Entity from an Entity Reference

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

An EntityRef is different from an Entity. Fortunately, we have a handy method, get(), that will let us find the entity associated with a reference. 

  1. In the moveChest function, find the else section that runs only once the chest’s moving up animation is finished. 
  2. Create a new variable with let called chestLid
  3. Set it to the entity by calling .get() on your chestLidRef variable.