Array Logics Make me mad !

0 favourites
  • 4 posts
From the Asset Store
100 items casual and logic games. All icons are of a high quality.
  • Hello , I'm back with another stupid issue with the array logics !

    The Logic seems perfect ... I want the blocks that aren't glued to other blocks to be destroyed after the primary generation ( = ) . Represented in the array by 2 ... Blocks that are floating around by themselves ...

    *******

    *> = <*

    *******

    Here's a my capx ...

    Hope you can also explain me where is my error , because those arrays make me nervous ...

    Thanks for all !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No one :( ?

  • Why are you destroying the blocks under "secondary generation"? To give more white space? I just can't see why those events are in there tbh. You're testing for collisions that will never happen because you have the "immovable" property set for the blocks so they'll never fall. Also, you've created them in a grid fashion, so they will never collide.

    Take out the events under Secondary Generation, or disable them. It works for me.

    As for the placement of the player, set a random XY after the blocks are created, then check if it's overlapping a block - if so, do another random XY and so on, until it's not overlapping. Or an easier method would be to place the player at specific coords, then in your block creation events, only create a block if it doesn't overlap the player.

    Hard to know if I've given the right answer. It looks like you're trying to create random platforms for the player to jump around on, in which case, my answer would be correct ;p

    As for your array knowledge, it seems pretty solid to me.

  • Oh wait ... that's the wrong capx ! Uhum , Sorry ... :( I lost the last capx

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