How do I make this (screenshot provided)?

Get help using Construct 2

Post » Tue Apr 29, 2014 9:12 am

Hello,

Attached is a screenshot with an explanation of what I want to achieve.

Is it even possible with Construct 2?

Thanks in advance,
Klevis
You do not have the required permissions to view the files attached to this post.
B
5
Posts: 12
Reputation: 251

Post » Tue Apr 29, 2014 9:37 am

Pretty possible. But will there be alot of squares in the screen or only one? If it's only one:

you could create the square from four sprites, height set to 10 and width set to 400, and placing them in a square formation. Lets call them wall. Then you create circle object lest call it ball. Give it an instance variable called "hitthewall"

then in the events:

condition:
on sprite collision with another object-wall
subcondition:
if hittewall=0

action:
ball-set instance variable-hitthewall=1

else if
if hittewall=1

action:
gameover.

But if the level has neighbouring or high number of squares it would be tedious to create them one by one by dragging four walls. And neighbouring squares would have two lines of walls so the ball would hit two walls when going from one to another. In that case you should either change the above code to reflect this or find another way.

It may be possible to check if the ball is hittin the edge by comparing positions and sizes.
B
17
S
4
G
1
Posts: 332
Reputation: 3,099

Post » Tue Apr 29, 2014 9:39 am

Yes. Give the circle an instance varibale "in_square". Set it to true when circle is inside the square

New event:

Circle.In_square = true
Circle overlappeing edges

---> Game over.
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Tue Apr 29, 2014 9:40 am

Thanks Windwalker.

It actually will have many squares, which will be close to each other. But I kinda got the idea.
B
5
Posts: 12
Reputation: 251

Post » Tue Apr 29, 2014 9:44 am

Thanks @Vuuv.

I will post the game here. Hopefully something comes out.
B
5
Posts: 12
Reputation: 251


Return to How do I....?

Who is online

Users browsing this forum: alextro, stevenode, tarek2 and 9 guests