Lenquist's Recent Forum Activity

  • 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!
Lenquist's avatar

Lenquist

Member since 13 Apr, 2014

None one is following Lenquist yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies