Before you begin
Use an enemy with saved Sprite Studio artwork and enabled enemy behavior.
Build it step by step
Open Configure enemy and choose Wait, then chase so the enemy can reveal the effect of detection.
Set Notice the player within (pixels) to 220 and Reaction time to 0.4 as a starting experiment.
Enable Walls block detection and attacks. Put a solid wall between the enemy and a player whose kind is Player.
Press Play. Approach outside the range, then move inside it. Compare the response with and without the wall blocking the path.
Adjust range and reaction time until the player gets a fair warning. Keep the rest of the settings unchanged for each comparison.
Practical example
A guard can watch a corridor but fail to see a player behind a wall. A longer reaction time gives the player a chance to retreat.
Test your work
The enemy reacts within its range and respects the wall option.
If it does not work
Check that the target is a living Player, not merely an object named Player. The controller chooses the nearest eligible player; it is not a general pathfinding system.
Student challenge
Create a safe hiding spot and measure how close the player can get before detection.
Show the result to a partner. Explain what you changed and how you tested it.
