# Looking for a Solution to 'Overlapping' Objects

Get help using Construct 2

### » Fri Jun 10, 2016 5:04 am

So I have this project I'm working on,
tl-dr; a mini project that consist of drag and drop into invisible regions and places the object there. Example: Apple into Shelve1, Shelve2, Orange into Shelve1, Shelve2

(IM SORRY, im quite desperate and have done researches, couldn't find anyone that helps)
a brief description of my work, i have Instances: Apple, ApplePlaced, Shelve1, Orange, OrangePlaced, Shelve2. (There are many Apple and Oranges)
Dragging in the Orange to OrangeShelve will Destroy the Orange, and Create the OrangePlaced at the position of OrangeShelve, and then Score+5
Dragging in the Apple to OrangeShelve will Destroy the Apple, and Score-5
Dragging in the Apple to OrangeShelve with OrangePlaced will Destroy the Apple and Score-5
(This is my problem) However, whenever it's a right decision, it plays a 'Ding!', and if it's wrong, it plays a wrong sound. And the "Dragging Apple into OrangePlaced" gives both sound because the way I'm doing is Apple Overlap OrangePlaced, Destroy Apple, Destroy ApplePlaced, Subtract Score by 10

P.S. I CANT USE CONDITIONS LIKE THESE
'Apple Overlap Shelve1'
'Is Not Overlap OrangePlaced'

for the 'Right Placement' as I have many other fruits and shelves which will multiply the score.

I'm a student who learn programming, I am totally new to construct 2 and have no one else I could ask help from.
My Idea of thoughts are like,
If (Apple Overlap OrangePlaced OR PearPlaced OR MelonPlaced) {
----Destroy Apple;
----Create Apple at Start Position;
----Score-5;
----Play Audio(WRONG);
}
Else //(Apple does not Overlap any of those mentioned) {
----Destroy Apple;
----Create ApplePlaced at LayerX (XXX, XXX)
----Score+5;
----Play Audio(CORRECT);
}

Please bear with me and help me out, any solution to the problem I facing? ):

EDIT 1: I'm using Drag Drop, and it shows.. Else (Not Valid Here). So.. im back to square1 again...
B
5
S
1
Posts: 6
Reputation: 337

### » Fri Jun 10, 2016 6:31 am

Hi !
first of all my english is not gud
but my solution is base on what i understand
>>>>>
suggestion is
do not destroy them
just make animation frames like
1) OrangePlaced & Shelve2
2) ApplePlaced & Shelve1
when apple overlap Apple placed change animation frame Shelve to ApplePlaced
I hope it helps you
B
84
S
46
G
49
Posts: 714
Reputation: 35,720