I am trying to create a system where an enemy shoots once per second if it has line of sight to the player by using a While loop. However when I try to run the preview it opens to a black screen, and when I close it Construct has frozen.
Here is the offending piece of code
If anyone can help me figure out either why this is crashing or a different method I would very much appreciate it.