How do I stop particles from spawning at 0,0

Get help using Construct 2

Post » Thu Jul 03, 2014 4:54 pm

Hello everyone, I need some help with a little project my son and I are completing together. We have recently purchased construct2 off of steam and we just added some magic to our little adventure character. When I added a particle effect to the magic projectile after a few shots to the upper left corner, It seems I get a continues particle emmiter spawning, and I am not sure what I did wrong. I am pretty new to construct, so we are still learning the ins and outs. Capx is posted from a Drop box link. Any help is greatly appreciated. I feel like I am overthinking this and I am sure there is a simple solution.Have a great day everyone.
Nite.
mediafire.com/download/597xozyncnoijn7/RpgAdventure.capx
B
9
S
1
Posts: 6
Reputation: 453

Post » Thu Jul 03, 2014 4:57 pm

@Nitestalker Break up the url with a space, I can have a look at the capx for you
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Thu Jul 03, 2014 4:57 pm

thanks @caiorosisca :) link fixed
B
9
S
1
Posts: 6
Reputation: 453

Post » Thu Jul 03, 2014 5:29 pm

Hey, I looked at the capx. Apparently what's happening is, when you shoot to the left as soon as the spr_iceSpeel leaves the layout is gets destroy due to the behaviour you added, at that exact moment the iceSpell(particle) haven't left the layout yet, so it doens't gets destroyed and tries to set it's position to spr_iceSpell's position, as it has been destroyed the system can't find it's position and returns 0,0. That's the reason your particle emitter is at 0,0.
It's not been spawned there, but moved there when it loses track of it's spr_iceSpell, I don't have time to fix it now, I would still need to try different ways to see what works. What you need is a link the spr_iceSpell and the particle emitter(maybe a container?) so when the first gets out of the layout you destroy both of them (remove the behaviour and create an is outside of layout event for it).
Or you can make a dirty fix and check if particle.position equals 0,0 > destroy.
Hope that helps
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643


Return to How do I....?

Who is online

Users browsing this forum: alextro, Ryan Kocourek and 2 guests