How do I pin and object to a UID?

Get help using Construct 2

Post » Sat Oct 17, 2015 3:15 pm

So basically I'm making an asteroid clone and want to pin the a alien on a UID asteroid. I know how to pin 1 object to another, but how do I do it to a clone?

Image

I know this is super simple.
B
16
S
6
G
2
Posts: 164
Reputation: 3,207

Post » Sun Oct 18, 2015 2:47 am

You do mean two of the same sprite?
You have to use a family. Put the sprite object in a family, and then you can refer to the object and the family as two different objects. Pin the object to the family.
B
230
S
62
G
33
Posts: 902
Reputation: 40,319

Post » Tue Oct 20, 2015 10:13 am

or perhaps you mean you want to pin the object at run time? instead of when you design it on the C2 editor?

use the On created event on the asteroid object, on creation it will spawn an alien, and immediately pin the alien on that asteroid
assuming the alien has a pin behavior, this is the example event:

asteroid On created | asteroid Spawn alien on layer "Main" (image point 0)
_____________________|alien Pin to asteroid (position and angle)

hope that helps
B
45
S
13
G
2
Posts: 173
Reputation: 5,331


Return to How do I....?

Who is online

Users browsing this forum: nahima and 7 guests