Swap an object to another & continue it's moving

0 favourites
  • 5 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hi every one.

    I'm making a game and in this game a ball is moving & rotating for free.

    I want to swap the ball to another object and that object continue moving in last ball's moving direction .

    I tried "obj1>spawn obj2 on layer..." ,"obj2>set bullet speed to ..." & "obj2>set bullet angle of motion to obj1.angle degrees" ; And "obj1>set bullet speed to 0" & "obj1>set posision to (610,-35)"

    but it goes to another direction like the picture below.

    What can i do?

  • 'swap' animations, in stead of objects.

  • You way over thought it...

    Simply make an invisible object that does all the moving and give all your others the pin behavior. Simply spawn and pin the appropriate object at the appropriate time and de-spawn the other. Depending on what you are doing you could just have them all ALWAYS pinned and them turn them visible and invisible as needed.... in my POC space shooter in my sig ALL the weapons the player can get are pinned on creation and simply become visible when bought/picked up...

    <------ These weapons in my forum pic

  • To me that feels like ...

    Every-time you take your girl to a party, and the party demands a different outfit, you just take another woman with you.

    'swap' animations on instances, in stead of objects.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • More like wearing your swim trunks under your clothes in case the party is a swim party...

    Its not a competition of ideas though, I was pointing out another way to solve the problem that didn't require fiddling with animations.

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