Lenquist's Forum Posts

  • 2 posts
  • Yeah I was wrong, I thought any object can be stored in an array, but it seems it can just hold a number or some text (must have missed this when I was initially reading the manual). Well there is always a workaround! Thanks for your help

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi everyone,

    just started, a few day ago, to use this great tool and so far it's going really well. I have one question though:

    I have an array that contains a number of different objects. These objects have different instance variables. What I want is to loop through this array and compare the instance variables values of these objects with some other value.

    How do I access the instance variables values of these objects?

    For the programmers out there, what I want to achieve is something like this:

    for (i = 0; i < array.length; i++)
    {
         if (array[i].instancevariable.value > SomeNumber)
                     doSomething;
         else
                     continue;
    }[/code:1d68ndsn]
    
    Thanks!
  • 2 posts