How do I correct particle object?

Get help using Construct 2

Post » Wed Feb 08, 2017 9:46 am

i use the particle object and a sprite, the sprite is used by the particle object, what i created is falling coins.

so when i run my app, everything works ok BUT after xminutes the app start to LAG more and more!!!

how to correct that problem??

here its my code:

Image
B
37
S
15
G
7
Posts: 1,682
Reputation: 9,616

Post » Wed Feb 08, 2017 2:21 pm

can someone help with this?
B
37
S
15
G
7
Posts: 1,682
Reputation: 9,616

Post » Wed Feb 08, 2017 2:49 pm

You're creating a coin (Sprite3) every tick, so roughly 60 a second or 3600 a minute, but I don't see anything to destroy the coin other than on startup.

1min = 3600 Sprite3
2min = 7200 Sprite3
...
10min = 36000 Sprite3

And these are Bullet objects too.
Find all the Construct 2 games that were on Steam Greenlight here
B
33
S
9
G
7
Posts: 451
Reputation: 6,782

Post » Wed Feb 08, 2017 3:21 pm

so how can i correct that?
B
37
S
15
G
7
Posts: 1,682
Reputation: 9,616

Post » Wed Feb 08, 2017 4:12 pm

imothep85 wrote:so how can i correct that?


Create less coins (maybe 1 every second or set an upper limit e.g. Sprite3.Count<1000) or destroy them the same way you do the particles.

It all depends on what you are trying to do with the coins and how many you actually need.
Find all the Construct 2 games that were on Steam Greenlight here
B
33
S
9
G
7
Posts: 451
Reputation: 6,782

Post » Wed Feb 08, 2017 4:34 pm

what i want to do is just falling coins from the top screen during 2/3 seconds and thats all
B
37
S
15
G
7
Posts: 1,682
Reputation: 9,616

Post » Wed Feb 08, 2017 4:50 pm

You can using the Fade behaviour with a Wait of 0.666 and a Fade out of 0.001. Leave Destroy after fade.
ImageImageImage
B
71
S
22
G
242
Posts: 3,734
Reputation: 134,994

Post » Wed Feb 08, 2017 5:59 pm

im trying to achive this effect

https://www.youtube.com/watch?v=--hpjO9vR18
B
37
S
15
G
7
Posts: 1,682
Reputation: 9,616


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests