The loop sees only the last object. Can you help me?

0 favourites
  • 3 posts
From the Asset Store
112 High-Quality destruction sounds for videogames
  • I'm sorry for my bad english. I have a problem.

    I have a button. Every time I press the button, 1 text object is created. These objects are listed one after the other. And every 5 seconds, the variable named money of these objects increases randomly.

    I want these money variables added to my global variable sequentially every 5 seconds.

    Actually it shouldn't be a problem, but there is. The loop only sees my last or top (I don't know exactly) text object and adds the number in its variable named money. I want all my text objects to see and add their variables separately.

    My problem is a little complicated. I hope I could explain in my bad English. I used the translator.

    I would be glad if you help. Bye

    I mentioned the loop in position, but I am not using the "LOOP" activity in construct 2. I do not want to be misunderstood. By loop, I mean exactly that my activity descends from top to bottom.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Probably missing a 'for each' and it is picking one instance. Difficult to confirm without screenshot of the events.

  • I've been struggling for 3 days for something that simple. I was about to cancel the project. Thank you very much. I added For each and the problem is solved

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