To test that these functions are all working the way we expect, we’ll need to be able to run through the trigger. If you have already pressed the Stop button, then pressing Play again will spawn your player, but your WASD keys or arrow keys will not control the player right away.
- Save your DigSpotScript, and save the game.
- Press the Play button to run the code.
- Click the Camera button in the top left corner to restore movement controls to your player character.
- Make sure the Dev Tools Console is open by pressing the F12 key, or Ctrl+Shift+I.
- Run over the Dig Spot, and watch how the events get logged to your console.