(Solved) logic from older project not working.

0 favourites
  • 4 posts
From the Asset Store
100 items casual and logic games. All icons are of a high quality.
  • Link to .capx file (required!):

    This link is a completely stripped down version of a game I have been working on with simple logic that should work but doesnt. The work around is included but disabled.


    Here is a newly made example with exactly the same logic that works as it should.


    Steps to reproduce:

    1. Both of the Cap.x have exactly the same logic but behave differently. I have made sure all of the project settings are the same for each.

    Observed result:

    I have been working on a game for quite some time now, keeping updated with each release. It seems like my project has just stopped working as it should! I have a work around for it but I am concerned my project has become corrupt.

    Expected result:

    They will react the same!

    If someone else can give this a run to make sure its not something to do with my computer I would appreciate it.

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: yes

    Operating system & service pack:

    Windows 7 64bit.

    Construct 2 version:


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have just reverted copies of the above files back to r126 and have the same results. Can anyone confirm this bug please? (Its just 1 event).

    Not sure what to do at this point. Should I start building the game again in the newer version from scratch? :(

  • I think it's working as intended. I'll try to explain. When you have "Sprite2.number = Sprite.number" it loops through each Sprite2 and each Sprite and compares them.

    In your first example it's comparing them like this:

    Compare Sprite2(number 3) to Sprite(number 1)

    Compare Sprite2(number 2) to Sprite(number 2)

    Compare Sprite2(number 1) to Sprite(number 3)

    You see it's looping through them both in different orders so only Sprite number 2 matches and it's the only one that moves. If you swap the numbers 1 and 3 on Sprite2 then they will all move.

    Probably you want to compare each Sprite2 to every Sprite so you should do something like:

    For each Sprite2

    For each Sprite

    Sprite2.number = Sprite.number

  • Ahhhh, I see!

    Your right, adding a 'For each Sprite' to the mix does to fix it and makes sense now.

    Thanks ramones I owe you one, though its probably about 5 by now :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)