How do I pin sprite to a moving object (bullet)

Get help using Construct 2

Post » Thu Jan 07, 2016 8:53 pm

Hey guys,

first of all (a little bit late), i wish you a happy new year!

My problem: (explained with the screenshot)
Sprite 1 is randomly spawning on screen. Everytime it is on screen i want the 2 instances of sprite 2 to get pinned onto sprite 1.
Sprite 1 has bullet behaviour and is "flying" from right to left every 1-3 seconds.
But i don't know how to pin sprite 2 onto sprite 1 while its spawning and moving.

I was searching in the scirra forum and tried some different methods but nothing worked for me :roll:

Thank you 8-)

Image
B
7
S
2
Posts: 25
Reputation: 507

Post » Thu Jan 07, 2016 10:32 pm

If I understand the question correctly..
I would create the sprite2 instances at the same time as the sprite instance and pin them immediately on created..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Jan 08, 2016 12:35 am

as the post above me has already hinted at system create object /on created/pin to object
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Post » Fri Jan 08, 2016 7:39 am

Thank you, but i already tried that method and it didn't worked...
Sprite 1 is inside a family and inside this family there are 3 different sprites. But sprite 2 should be pinned to all of them at the time they appear on screen :)
B
7
S
2
Posts: 25
Reputation: 507

Post » Fri Jan 08, 2016 9:44 am

If you change the question, you change the answer
so than it would become something like

family is on screen
system trigger once
> sprite2 pin to family
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Jan 08, 2016 10:04 am

Thank you, now it works :)
B
7
S
2
Posts: 25
Reputation: 507


Return to How do I....?

Who is online

Users browsing this forum: Darknessed, Yahoo [Bot] and 39 guests