Overlapping objects question

0 favourites
  • 10 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hello Guys,

    I am working on something and I have the same objects 3 times on the same canvas and I created a "Function" that spawns another object above them. Like 3 burgers spawning above 3 plates. My problem is that if I move the burger on the plates that are already full it moves there and I want to recognize if the plate is full or empty and act in consequences.

    Here is what I have done:

    If anybody has an idea because i am stuck, I tried everything I know

    Thank you and have a nice day!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can do this in one event.

    Have an instance variable or boolean i.e. isUsed on the plate.

    Have 2 variables on the burger which is its current position (for cancelling). curPosX and curPosY.

    Then the event is Burger on drop, if overlapping plate and plate.isUsed is set to false, set burger position to plate and set plate.isUsed to true, Else set burger position to burger.curPosX, burger.curPosY (its position before it was picked up).

  • Hello and thank you for your response. i think i managed to do something but I still cant manage to make it work.

    I am going to post a link with the capx maybe if you have time you can have a look.

    dropbox.com/s/g03m2oerdg6sj ... t.rar?dl=0

    Thank you again!

  • I think that link is broken, but sure I can take a look.

  • the link is broken because Scirra blocks all new members posting blue one click links to fight spam. Soon op will be able to post blue links.

    OP your next comment will make you enough rep to unlock url linking

  • , damjancd Thnk you for your responses

    I will make another reply with the link

    Have a nice day !

  • Here : https://www.dropbox.com/s/u5nzb1s2wbqlt ... .capx?dl=0

    Not sure what you're trying to do with the count_instance variable though.

  • Thank you for the help, i still cant achieve what I wanted....the count instance is used for something else. I thin I will just use different plates in a family so I can have more control.

    Thank you again

  • I managed to find the solution, All i needed wast to add.....Burgeron created and is overlaping Plate.....set curPosx and curPosy to plate X and Y....and set is Used to true.....and the thing you told me to add.......If anyone needs help with this you can DM me at any time.

    Thank you again:)

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