Have you ever wanted to activate an event based on whether there is a brick next to another brick?
Now you can!
Introducing Brick detection:
works a like onRelay but fires based on whether there is a brick in that direction.
Overview:
input events:
onDetect:
occurs when this brick fires detectDirection and a brick is found
onNotDetect:
same as above except no brick was found
onDetected:
fires when another brick hits this one with a detect event
output events:
detectDirection [direction] [(new)distance]
fires a ray in that direction and can fire the input events above.v1.1
minor bug fixed where if the center of an adjecent brick were not directly in the direction requested of the center of the brick firing the detectDirection event.
v1.2
distance option added by request.
every brick between distance and the brick firing the detect even have the onDetected event fired.
now for the file...
https://sites.google.com/site/zmasterfun/event_Brickdetect.zip?attredirects=0&d=1