How do I create 1 instance on 1 of several created objects?

Get help using Construct 2

Post » Sat Jan 21, 2017 5:53 pm

This is how I am handling my stars being created and pinned to the disks.

Image

What I would like to do is, when X amount of LG disks have been destroyed, create 1 Golden Star on a single LG disk.

There are 2 LG disks in that family, 1 is created above the layout and moves at 90 degrees, the other is created below the layout and moves at 180 degrees.

I can't figure out how to create that 1 Golden Star on a single 90 degree disk or a single 180 degree disk.


Any suggestions?
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Sat Jan 21, 2017 5:59 pm

StarBlueLG needs their own ON CREATED outside the sub events.

But I would not use pin if I were you.

I'd do this instead:

Every Tick | StarBlueLG Set Position to: LGDisk(Self.IID).X ; LGDisk(Self.IID).Y
Image Image Image
B
31
S
11
G
27
Posts: 748
Reputation: 17,093

Post » Sat Jan 21, 2017 6:18 pm

MPPlantOfficial wrote:
I'd do this instead:

Every Tick | StarBlueLG Set Position to: LGDisk(Self.IID).X ; LGDisk(Self.IID).Y


Not when you have 30+ disks on screen. It bogs the fps down. And i need the pin cause if the ball has a power-up i need the power-up to suck the nearby stars in.


And sorry, this doesn't really answer my question. But thank you for the reply.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Sat Jan 21, 2017 7:04 pm

I don't know. I would think 30+ disk all of which have simultaneous pinning would slow down more than simple instance positioning.

My one event in the previous post should save you another For Every statement. That's 2 events.

Could you upload capx so we can test?
Image Image Image
B
31
S
11
G
27
Posts: 748
Reputation: 17,093


Return to How do I....?

Who is online

Users browsing this forum: hrisnz and 9 guests