A access feature

Hey, @grazer is it possible to add a feature where you could access other objects without sending messages. For example, proximity touches objects then the proximity would look at which object it touches or many objects and could send a chain reaction to all objects or one object for example like changing its visibility or movement or anchoring the object.

For example

local hearth = 3

if player.collide = enemy or enemy.collide = player then()
enemy:destroy()
hearth = hearth -1
end

Could global variables accomplish what you want?

@johnpost, For example:

I don’t quite get what you are asking.

For example if a proximity is activated if the player touches a object this behavior would execute the properties inside of the chain behavior to the other object and it would become invisible or not or you could change the solid to true or false.

@johnpost

Or it could be a keyboard behavior or other kinds of behaviors that would send a signel to the chain behavior and it would execute the properties inside of the chain behavior to the object.

Could you just use behavior bundles and either messages or global variables?

I agree with @johnpost , global variables are perfect to be used as triggers to control multiple objects at once.

I think this is what the “code” behavior is gonna help in a future update.