How do I move a "gap" through which things pass

0 favourites
  • 6 posts
From the Asset Store
Assets for creating mountains and ravines environments
  • Hello everyone,

    First time posting here, seen some tutorials and examples, played around with the tool and thought just to make some basic gameplay tests of different types of games and got to one that i can't figure out how to implement. I want to make it touch usable or with mouse.

    Imagine a top down football player kicking a ball in the goal. That is the gap. Multiple balls come towards a wall with a gap in it and the player has to scroll sideways to catch the balls. To make it a little harder, the next thing would be the walls also go up and down.

    Maybe this image will make it more clear.

    Im trying to figure out the mechanics and logic behind this. I looked at the vertical shoot up example in the tool but its not helping much. Do i make the wall 2 pieces with an actual gap? Or one piece with a special place in the middle that acts as the empty space? What happens when the gap is in the far left for example, how will the wall extend into the right to keep the wall consistent?

    I searched the forums for hours but couldn't find anything.

    Thanks to all

  • Maybe you can try with collision polygons? Look at this example: dropbox.com/s/48kmtwxph77g2vb/collision.capx

    When cursor collides with sprite than the sprite is destroyed.

    In sprite editor i edited the collision polygon and cursor can go through the sprite.

  • Thank you for replying but i think i explained it wrong

    I want the mouse/touch to control the movement of the gap. The gap has to move left/right up/down and at the same time the wall to remain consistent and fill the rest of the space.

    maybe this will be a little more clear

    I experimented a little with this but i cant make it. I cant make both sides of the wall move at the same time to keep the gap there or it behaves completely wrong. Especially when i add the possibility to also move it up. Im interested in the logic behind this, the events i might figure out myself but the way to do it i can't.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh, OK. I'm not sure how to do this, but you will probably have to use two sprites. Maybe try with overlapping?

  • That is fantastic!

    And it's so simple, you wouldn't want to know the ways i tried making it...

    It's a lesson to learn from you example, from the layout to events. I would have never thought like that.

    Thank you for showing me!

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