for each loop with objects fulfilling conditions

0 favourites
  • 3 posts
From the Asset Store
SynthWave Loop Pack includes 68 seamless loops, founded on 11 original melodies. For use in game and custom works.
  • hey everybody,

    i just wanted to ask if it's possible to have the for each loop just used for the objects that fulfill the right conditions,

    because i wanna have a variable by all of the objects checked that meet the conditions, and if all of these objects have the same value sth. happens.

    i hope it is clear what i'm trying to ask ^^.

    greets cannikon

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, just put the condition above the for-each loop.

  • sorry for the late answer but i wanted to thank you - that part now seems to work.

    Even though there is another part that has something to do with it and that is causing problems now.

    If all the switches that are connected are pressed (a local variable gets changed) and because of that a block appears, but when one of them isn't pressed any longer the block is still there.

    just when all switches aren't pressed anymore the block dissappears again.

    What i want though is that the block is there just as long as all switches are pressed.

    here's the code example i hope it helps to understand what i want to say:

    I thought it's better to ask it here at this topic because it is somewhat connected than creating another topic - i hope that is ok :) .

    It would be veryy great if someone could help me

    <img src="smileys/smiley1.gif" border="0" align="middle" />

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