0 Favourites

How do I Push down one object with another

  • Hi

    I know this is going to be "simple" to do but I am trying to apply the effect that when object A drops on top of object B , it pushes object B down and for a period or amount that has been applied, stays with it and then will be destroyed.

    This is difficult to explain so I hope I have made some sense of this

  • How do you move object A ?

  • Hi

    I know this is going to be "simple" to do but I am trying to apply the effect that when object A drops on top of object B , it pushes object B down and for a period or amount that has been applied, stays with it and then will be destroyed.

    This is difficult to explain so I hope I have made some sense of this

    Object B is getting squashed and destroyed?

    One way to do it would be to give Object B an instance variable: HP = 100

    Object A [is on top of Obj B.] | Object B HP - 1

    ^ Many ways to do this.

    If Object B HP <= 0 | Destroy Object B

    You can also set Object B.Height to: Current_HP*ObjectB.Height / Max_HP

    That way it will appear like Object B is getting crushed.

  • How do you move object A ?

    Physics is off then on click physics is on and it drops down onto of it

    [quote:3bbrozcc]Object B is getting squashed and destroyed?

    No Object A is destroyed after pushing object B down by X amount of pixels etc does that make a difference to your example ?

  • Thats gonna be hard to do. With physics. Sorry for retreading.

  • Thats gonna be hard to do. With physics. Sorry for retreading.

    99Instances2Go

    Just to make you aware of what I am trying to achieve and perhaps the way I am going about this could be changed. Basically I have an object lets say that is object_A which moves across the screen and moves down by X pixels once it leaves the screen and comes back around. There are a series of objects_C across the screen like buildings but I am currently using coloured boxes for now, when a mouse click is done anyway on the screen object_B is created from an image point of object A and is dropped onto one of the objects_C.

    When contact is made with object_b and object_c damage is done to object_c and so on.

    I am trying out how things work with Construct 2 and I thought it would be a good idea to base this project on an old 80s game (Not sure if it would be appropriate to release these days but I would anyway due to copyright) called blitz , use to play this on the good old vic 20!!.

  • Did you know that is on YouTube ?

  • Did you know that is on YouTube ?

    I didn't know this as in how to make this game and with the same effect as I am after?

  • > Did you know that is on YouTube ?

    >

    I didn't know this as in how to make this game and with the same effect as I am after?

    I forgot to share the link. Here goes.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • >

    > > Did you know that is on YouTube ?

    > >

    >

    > I didn't know this as in how to make this game and with the same effect as I am after?

    >

    I forgot to share the link. Here goes.

    Oh yes I have seen that I thought you meant that there was a tutorial based on it sorry for the misunderstanding also thank you for the capx file I will look at this

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