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

0 favourites
  • 5 posts
From the Asset Store
This is a Dungeon Master tool & the 1st of 12 Combat Engines from the Building Combat Engines for Browser Games workshop
  • 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

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

    Best regards.

  • 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,

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks, you are the best

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