Before, both the “Number of objects” condition and Count() expressionwould actually pick all instances of that object, which was confusing to a large majority of users. The expression also picking objects, was unusual behavior.
The two new expressions and conditions have pretty detailed descriptions in the engine currently, but to reiterate on those, they work as following:
Number of object instances currently picked (or the “PickedInstancesCount()” expression):
- This shows the total number (count) of instances of that object that are picked by the current event.
- So if you have a “TestObject X position is > 100” condition, having the “Number of TestObject instances currently picked > 2” condition will mean the event will only fire if there are at least 2 or more TestObjects that have an X position greater than 100.
- If you just have “TestObject X position is > 100”, and then have an action that uses the PickedInstancesCount() expression, it will return the total number of TestObjects that have an X position > 100
Number of object instances currently in the scene (or “SceneInstancesCount()” expression):
- This shows the total count of that object instances in the scene, regardless of the current event conditions.
- This is useful for if you want to create more objects if the total count of objects falls below a certain number, and then apply actions to just that new instance you create in the same event. With the old condition/expression, using “number of objects < 100” as your condition, creating a new instance and then applying actions to it would apply those actions to all instances, since the condition picked all of the instances.
Overall, the big change is that the new conditions and expression do not pick any objects. If you would like them to also pick objects, you just use “Pick all instances” after the rest of your conditions, or in your actions.