How do I make this (screenshot provided)?

0 favourites
  • 5 posts
  • 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

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

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

  • Thanks Windwalker.

    It actually will have many squares, which will be close to each other. But I kinda got the idea.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks

    I will post the game here. Hopefully something comes out.

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