Melting two objects into 1

Hi there

can some one tell me how i could “melt” two objects into 1 new?

What i have so far is, i have one object and set it 10 times in the game field.

the object has 3 animations states.

at start of the game, the object gets a random animation state:
change the number of animation of object: set to Random(2)

now if there 2 objects with the same animation (example “0”)
and they have a collision via moving (or what ever), they should melting into 1 single object and the animation has to change into “1” a.s.o.

apropos moving: how can i move an object only in a certain area?

And how does the object moving back to the first position where i grabed it, if there is no matching other object?

Thanks for helping me in before

MArio Michel
Germany

Hello, I did not understand very well what you wanted to say, but for the direction of the enemy, you can go to the GDevelop WIKI.

Hi and thanks for replay

What i mean is:
Imagine a kind of candy crush game, how can i melt 2 objects of the same type (lets say two green candys) together in 1

Regs
Michel

no one an idea how i could “melt” two object of the same type (by animation, by value or what ever) into 1 new?

Hi,
I see two options for “melting”:

• a handmade animation composed of a number of still images of the objects getting closer and melting together. This animation is a single object, so either you delete both objects and create the animation object on their position, either you delete one of the objects and change the animation of the second object to show the melting of both.

• a complex series of tweens to change the shape, size, position and opacity of each object.

Hi, ok thank you.

I think i try this:

1st:
the object who is touched gets value = 1 (if not touched value = 0)

2nd:
collision of 2 objects withe the same animation (0)
and value is 0 = change animation (1)
this should change the animation only for 1 object right?

3rd:
collision of 2 objects withe the same animation (0)
and value is 1, delete object
this should delete only one object right?

I´m not sure if this works

What about to drag an object and move it just in a certain area? how can i handle this?
In my example let´s imagine 9 x 32/32 blocks, and i´d like to move the middle block to left or right (up or down) where ever the block with the same animation is, but not bayond them. Just like in a kind of candy crush game, where are you not able to drag an candy around the game field as you wish.

I hope you understand me, english is not my native language

regards
mario michel

no one an idea with this “drag and drop in a certain area” thing?