I am trying to set a condition to create random number of objects of one type. For this i use GV that is being set at the start of layout. then, right under it i set that
Value compare if ObjectX.Count is less then GV: create ObjectX
But it doesnt work. Instead - when debuggin ive get and error saying:
"ESpression 'Count': No 'ObjectX' object exists. returning zero.
Well gee wiz, i know that theres no ObjectX and thats why i want the event to create them. Why its not working?
Develop games in your browser. Powerful, performant & highly capable.
The object you're checking - is it a family or something else? Because using a family name and the .count expression, such as enemy.count doesn't work and always returns 0. You can work around this by using an event at the base level, then system>compare> is countmatching("enemy") less than x.
thats why its so weird, i am not using fammilies at all O.o
i just use "value compare" from system expresion. then in value one i click on the objectX from bottom microwindow and pick "number of objects"
then as a value i just use GV.