I would like to suggest that many of the behaviors that involve interacting with other objects (e.g. proximity, raycast, message, etc.) need to have outputs and inputs for the specific Object ID of whatever object they are detecting or looking for.
For example, you could use a proximity behavior to search for the closest object of a certain type, output that closest object’s ID, and then input that ID to a message behavior to send it to that object specifically.
Or let’s say you emitted an object, there would be an output on Emit that outputs the new emitted object’s ID; you could input that ID to a raycast to check for the distance to that Object in particular, and then message that specific object when it gets a certain distance away.
I’m pretty sure that in Flowlab’s code each behavior already is checking through a list of each object’s ID anyway; why not make use of them and output them?
Here are the specific behaviors I’m suggesting should receive both Object ID inputs and outputs:
Mailbox (ID input of which object to receive messages from & ID output for which object the message came from)
Message (ID input for which object to send to & ID output for which object(s) got sent the message (if any))
Emit (ID output for the new emitted object’s ID)
Attach (ID output for the new attached object’s ID)
Spawn (ID output for the new spawned object’s ID)
Raycast (ID input for the object to search for & ID output for the ID of the detected object(s))
Proximity (ID input for the object to search for & ID output for the ID of the detected object(s))
Collision (ID input for the object to check for & ID output for the ID of any hit object(s))
Extract (ID input for the ID of the object to extract a property from)
Here are some extra behaviors that could use ID outputs but might be tougher to implement them in:
Global (outputs the ID of the object in which it was last updated)
Player Count (2 outputs for the ID of any new player objects that join or leave your game)