Module 14 · In Studio · challenge 1 of 3 in this lesson
Greybox two new zones as MapBuilder data
A test in Studio grades it and prints a pass code.
Open
Level 3, Professional
Challenge
Implement the blockout validator in challenges/work/blockout_check.luau. The written solution is challenges/solutions/prototype-and-blockout.md. In Play on the server, run game.ServerScriptService.RunGameTests:Invoke("prototype-and-blockout", "prototype-and-blockout-rules") and paste the pass code here.
- Start from
- The game at milestone m14 (download)
- Grade it
- In Studio, press Play, then run
game.ServerScriptService.RunGameTests:Invoke("prototype-and-blockout", "prototype-and-blockout-rules")in the server command bar. Copy the pass code from Output.
Done means
- segmentHitsBox accurately tests 2D XZ segment-vs-AABB intersection
- hasSightline ignores obstacles at or below EYE_HEIGHT (4.5) and fails when a taller obstacle blocks the segment
- isWalkableChoke requires widthStuds >= playerRadius * 4
- allZonesReachable traverses undirected links from startId and verifies every zone is reached
- validateBlockout checks sightline, every connector width, zone reachability and loop presence (links >= zones when 3+ zones)
- challenges/prototype-and-blockout.luau prints TEST PASS for every check