How do i when destroy an object appear two with the same ani

Get help using Construct 2

Post » Thu Jul 31, 2014 2:47 pm

Hello, i´m making a fruit ninja style game, to make it easier, i make an object to cut, and i change their animations.
For example a shoe is one animation, a ball is other animation and then i make it change the animation random when it spawns. When you cut the object appear two objects, the two middles of the object cutted but isn´t correspond with the object cutted.
Thats its a example:
Appear randomly three objects, shoe, ball and phone, when you cut a shoe appear two middles of shoes, when you cut a ball appear two middles of phone, etc...
This happens to be random.
My question is how can i make when i cut a phone, make the middle object set animation middle phone and the same with all the objects?
Thanks.
Sorry if the post is not understood, I'm Spanish
Image
B
38
S
10
G
2
Posts: 66
Reputation: 2,823

Post » Thu Jul 31, 2014 2:51 pm

Can you post your capx? it's easier to understand and reply with the solution,

Best regards.
B
8
Posts: 20
Reputation: 302

Post » Thu Jul 31, 2014 5:23 pm

Image
B
38
S
10
G
2
Posts: 66
Reputation: 2,823

Post » Thu Jul 31, 2014 11:46 pm

Got it!

I tweaked yout capx a bit, i have added a textbox for ~debug purposes~ you can remove it.

I created one instance variable on Full object to store his Animation Name.
Then, tweaked your ~is cutting~ event, wrapping inside a for each.
Then i check the instante variable to determine which animation the full object have.
Then i do the set animation on half objects and there you have your correct half sliced object!


I hope i'm not too late with this solution =P
Best Regards,
You do not have the required permissions to view the files attached to this post.
B
8
Posts: 20
Reputation: 302

Post » Fri Aug 01, 2014 10:15 am

Thanks, you are the best
Image
B
38
S
10
G
2
Posts: 66
Reputation: 2,823


Return to How do I....?

Who is online

Users browsing this forum: Cubeeo and 24 guests