SirML's Recent Forum Activity

  • ><<, just noticed something, I was debugging it when existe nevers should stay on 0.

  • Ok now, I've changed (minorlly) the logic and I've located the problem

    The nested array run-through is working, but when checking if "existe = 0" it's not doing anything. (For each NEW when done checking the ACTUALs), I want to do something if it the current NEW element "exists" in ACTUAL.

    Greetings.

  • Hello everyone,

    I'm trying to use your plugin to run through an array, but It can't find the length of it.

    Any ideas?

  • NOT, that didn't worked.

    I'm getting this:

  • I think that last version worked...., the question now would be how do I push the entire new value, this is the push result:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi, thanks for replying.

    Nevermind the "wait" and and text values, this is the cleaner loop:

    Ok then, my intention is to keep updating the "ACTUAL"(old) array with the "NEW" incoming data, because I'll be creating/deleting a related object for every element that needs to be inserted or removed for the ACTUAL array.

    That's why I thought of doing this nested loop thing, and I think what should be happening is the following, just like 99instances highlighted:

    Actually the loops are suposed to solve this array setup:

    NEW = [1,2,3]

    ACTUAL = [1,2]

    //this means that "3" was newly added and needs to be updated into ACTUAL. Like I said, this update involves creating a few objects and some other mumbojumbo.

    Check for missing and push in:

    1 exists in ACTUAL = NO //default to NO(on sub loop start)

    1 = 1 ? YES

    1 = 2 ? ---

    Does 1 exists in ACTUAL? yes, do nothing //it will keep marked to be missing until it actually exists, check 3 below

    2 exists in ACTUAL = NO //by default

    2 = 1? ---

    2 = 2? YES

    Does 2 exists in ACTUAL? yes, do nothing

    3 exists in ACTUAL = NO //default

    3 = 1 ?

    3 = 2 ?

    Does 3 exists in ACTUAL? NO, do do and do.(here I push 3 into actual)

    thanks again.

  • I'm trying to handle a "new" vs "old" array situation, and to do this I run(I'm trying to) a complete object to object comparison, currently I'm using a nested "for each X element", for each X on NEW array check with for each X in OLD array.

    But I can't seem to make it work, I was wondering if I'm not using the proper structures to do the run through.

    Here's how I'm building it:

    And this is the array structure data that I'm handling:

SirML's avatar

SirML

Member since 31 Aug, 2012

None one is following SirML yet!

Connect with SirML

Trophy Case

  • 12-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies