first particle spawned "on created" sticks but others are ok

Get help using Construct 2

Post » Sat Oct 29, 2016 11:56 am

Hi there,

So I have simple setup.. i want to spawn a series of asteroids as enemies and i want to have a particle attached to each one of them. this works great except the very first time.

The very first time it happens the particle i attach is orphaned and doesn't attach.. but all later ones are attached properly.

one hack was to spawn one off screen starting out, but i just don't like it behaving like this and would like to find a more elegant solution.
Posts: 975
Reputation: 7,123

Post » Sat Oct 29, 2016 12:04 pm

I saw your previous post and was in the process of answering :P it works for me if I put the particles in a container with the asteroid. Then when you create an asteroid the particles are created along with them. Then pin them on created as you had in an event. It works fine for me even with the first spawned asteroid. There will be a logical reason why it doesn't happen for you, can probably be debugged to find a solution. This might sound obvious but maybe it wasn't considered as a possible reason behind it, is your first particle object already in the level so it is not created and therefore will not trigger the on created event for pinning?
Posts: 2,317
Reputation: 51,518

Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 5 guests