Swap an object to another & continue it's moving

Just started using Construct 2? Post your questions here

Post » Fri Oct 07, 2016 4:29 pm

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.
Image
What can i do?
B
7
S
1
Posts: 7
Reputation: 389

Post » Fri Oct 07, 2016 6:29 pm

'swap' animations, in stead of objects.
B
33
S
18
G
27
Posts: 2,447
Reputation: 20,358

Post » Sat Oct 08, 2016 2:56 am

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 :)
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
65
S
17
G
8
Posts: 636
Reputation: 9,333

Post » Sat Oct 08, 2016 4:45 pm

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.
B
33
S
18
G
27
Posts: 2,447
Reputation: 20,358

Post » Sun Oct 09, 2016 5:09 am

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.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
65
S
17
G
8
Posts: 636
Reputation: 9,333


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests