I’m proposing a small change to ConditionList.cs in order to return false as soon as a condition fails, in case of “ALL True” is selected.
I changed the code myself and it works perfectly.
At line #49 I added:
1
2
elseif(allSuccessRequired)
returnfalse;
This solves two problems:
– If the next condition has a required field and it needs to check something on a variable that is set by a previous condition, it won’t throw an exception saying that the required field is not assigned when the previous condition fails
– Improves performance because you don’t need to check all conditions in case one of them fails
Take a look at the screenshot for an example.
The condition “Coin Spawned” checks if a coin has spawned. If true, it will save the coin into a BB variable. The next condition needs to check if the coin is close enough, so it needs to access that BB variable. The problem is that if there’s no coin spawned the variable will be set to NONE and the Check Distance condition will throw an exception.