When when /rect/ points /direction/ with length /l/ at /someone/ /lambda/ with environment /e/ { if {[string match "/*" $rect]} { return } Wish $rect points $direction with length $l } When when /rect/ points /direction/ at /someone/ /lambda/ with environment /e/ { if {[string match "/*" $rect]} { return } Wish $rect points $direction with length 1 } When /someone/ wishes /rect/ points /direction/ with length /l/ & /rect/ has region /region/ { set scale $l if {$direction eq "up"} { set whiskerRegion [region scale $region width 0.01px height $scale] set whiskerRegion [region move $whiskerRegion up \ [vec2 distance [region bottom $whiskerRegion] [region top $region]]px] set color blue } elseif {$direction eq "left"} { set whiskerRegion [region scale $region height 0.01px width $scale] set whiskerRegion [region move $whiskerRegion left \ [vec2 distance [region right $whiskerRegion] [region left $region]]px] set color gold } elseif {$direction eq "right"} { set whiskerRegion [region scale $region height 0.01px width $scale] set whiskerRegion [region move $whiskerRegion right \ [vec2 distance [region right $whiskerRegion] [region left $region]]px] set color green } elseif {$direction eq "down"} { set whiskerRegion [region scale $region width 0.01px height $scale] set whiskerRegion [region move $whiskerRegion down \ [vec2 distance [region bottom $whiskerRegion] [region top $region]]px] set color white } set whisker [list $rect whisker $direction] Claim $whisker has region $whiskerRegion Wish $whisker is outlined $color When /target/ has region /r2/ { if {$target != $rect && $target != $whisker && \ [region intersects $whiskerRegion $r2]} { Claim $rect points $direction at $target Claim $rect points $direction with length $l at $target } } }