Apply behavior on certain instances only

Hi! I think it would be useful to be able to apply a behavior on some instances only. It is internally AFAIK totally possible, as the passed objectData can differ between two instances. This would be decided with an optional parameter in the create object action and in the properties panel. This would be useful for performance if you have a certain object type that has some instances that requires for example physics but not all of them, and selecting the right ones and disabling the behavior on the right ones can be tidious and isn’t optimal for performance as the behavior is still attached to the object, even if not active. But then idk if it is really possible to modify objectData of specific instances :thinking:


If you add instance IDs, couldn’t you do this through events currently?

e.g. say you have 5 box objects. You want the platform behavior only on box 4. You add an ID variable to the object, and number them 1-5.

You just have an event that is

At the beginning of the scene
---For Each Box Object
----If ID != 5 || Deactivate behavior Platform

Would that not work?

yes but actually no.

1 Like