How do I Solve This (Drag & Drop) Match Animation Frame

Get help using Construct 2

Post » Sun Mar 02, 2014 7:49 pm

Hi all!

I am very new to Construct 2, but I really love it. :)
I made an object with 7 frames, which I can Drag & Drop above some other sprite (water).
On overlapping of this two I want to check if the object.AnimationFrame of the first object is the same as the second.
If this is true destroy them. But when I am dragging the objects my global numbers are wrong.

Please do this:
1.) Drag frame number 3 above water (Frame1Number = 3)
2.) Drag frame number 1 above water (Frame2Number = 1)
3.) Drag frame number 3 back (Frame1Number =1, Frame2Number = -1) => until here everything is OK
4.) Drag the same frame number 3 above water (Frame1Number =1, Frame2Number = 1)

This is just an example. There are other problems too.

I am tired of trying and trying. Can somebody please help me? How can I solve this?

Attached you find an example (.capx)
You do not have the required permissions to view the files attached to this post.
B
3
Posts: 2
Reputation: 179

Post » Mon Mar 03, 2014 11:30 am

Any help please? Can I solve this with other functions?
B
3
Posts: 2
Reputation: 179

Post » Mon Mar 03, 2014 1:23 pm

I've had trouble with some similar problems with this and I know how frustrating it can be. I really can't follow what you're trying to do in the event sheet. But I feel the algorithm should be:
- When a tile is dropped on the water
- - If there is another tile on the water, then check if they have the same frame number
- - - if they have the same frame numbers, destroy both tiles

I find a problem I've had many times in construct when using multiple instances of the same object, you need a way in the event sheet to specify which instances of the object need to perform actions. I'd recommend having a look at this tutorial:
https://www.scirra.com/tutorials/280/cr ... ame/page-4
B
14
S
3
G
4
Posts: 52
Reputation: 3,271


Return to How do I....?

Who is online

Users browsing this forum: jasontoups, raptor0555 and 1 guest