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

Just started using Construct 2? Post your questions here

Post » Mon Jun 15, 2015 8:31 pm

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.
Image

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 :)
B
3
Posts: 3
Reputation: 181

Post » Mon Jun 15, 2015 9:15 pm

Message: Kresho can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Maybe you can try with collision polygons? Look at this example: https://www.dropbox.com/s/48kmtwxph77g2vb/collision.capx?dl=0
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.
B
8
S
1
Posts: 34
Reputation: 439

Post » Tue Jun 16, 2015 3:34 pm

Thank you for replying but i think i explained it wrong :D

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 :)
Image

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.
B
3
Posts: 3
Reputation: 181

Post » Tue Jun 16, 2015 9:38 pm

Oh, OK. I'm not sure how to do this, but you will probably have to use two sprites. Maybe try with overlapping?
B
8
S
1
Posts: 34
Reputation: 439

Post » Thu Jun 18, 2015 11:26 am

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Jun 18, 2015 5:23 pm

That is fantastic! :shock:

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!
B
3
Posts: 3
Reputation: 181


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests