Objective: Make the enemy move towards the player when within a certain range.
Step 1: Create the variables for toggling this movement mode on and setting the max distance from our player to begin. In order to make it easier changing this distance Serialize it.
Step 2: Setup the code to check the distance to the player and enable moving towards if close enough
Step 3: Create the code for moving towards the player’s position once this is toggled on.
Step 4: Make sure to include this new check in the other movement sections in order to avoid conflicts.