Ball is trapped between 2 objects

0 favourites
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I've been trying to work this thing out.

    I have a 2 circles and a ball.

    I want the ball to explode When its trapped between the 2 balls while another object is pushing it down.

    <img src="http://img443.imageshack.us/img443/3451/examplenr.png" border="0" />

    I Appreciate any Ideas.

    Thanks

    Haroon Shishani

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ooh, that's a tricky one. I wonder if there is even anything in box 2D itself that can detect how much an object is being 'crushed?'

  • is there any function like isTouching that gives true if one object is touching another one ?

    But the touching should depend on the image collision polygon.

    I just want something like

    If ball borders are touching both circles then

    if that object on the first circle is going down and pushing the ball down then

    explode the ball and destroy it

  • Why don't you post a .capx? so we can fix it

  • There is no upload option in my editor !

  • There is no upload option in my editor !

    I don't get that you say.

    I think you might to register on dropbox, is a web service that you can store files at cloud hosting. 2 GB is free. Also everyone on this forum use dropbox.

    Simply save as single file, it creates a .capx and upload your .capx on dropbox.

  • If you want to test for 'touching', that is simple. Just use 'is overlapping'. I thought you wanted to find out if there is excessive force on the ball, more of a challenge.

  • I don't get what you don't get !!

    I just said I don't know how to upload the file in here since the editor doesn't have an upload option :)

    Any way I will register in the dropbox and post the file here.

    Thanks

  • Why does the editor have no upload option? it's a subjective.

    There a tutorial might help you, make sure to copy .capx

    http://www.scirra.com/tutorials/42/upload-your-game-to-dropbox/page-1

  • Thanks sqiddster, I think I will try the overlap :)

    And Joannesalfa Thanks you were helpful

  • Use the "And" expression to qualify the destroy event:

    Is overlapping Circle 1 - - - Destroy Ball

    And

    Is overlapping Circle 2

    And

    On collision with Object

  • "And" expression?

    I never heard it...

  • Is that you mean?

    <img src="http://i.imgur.com/mrNCY.png" border="0" />

    I don't think "And" expression exists on this editor, just use 3 conditions in an event. I believe it's called "And blocks".

    Don't mind about these objects on this screenshot, it's for an example and i made a typo :P

  • Was my poor explanation! To my knowledge any event with multiple conditions is using logical And by defualt, unless you specify logical Or.

    tl;dr: Add multiple conditions

    construct.net/en

  • Yes, the AND is implied when there are multiple conditions.

    I still wonder if there is way to tell how much an object is being 'crushed'... Could be very useful! I can think of a way to do it manually with only circular objects, but nothing else... Hmmm...

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