Particle Evolution

Get help using Construct 2

Post » Wed Feb 03, 2016 10:38 am

Hey there,

In my project, on some levels i have a snow effect, made with particles. Now if you move from one level to the next, the snow particles are of course gone and need start all over again. This doesnt look very realistic, as on every new screen the particle starts spreading from zero.

Is there a way to have the particles spreading already on start of a layout, so they dont start from zero?
I hope you understand what i mean.

Thanks in advance!
B
11
S
3
G
2
Posts: 76
Reputation: 1,891

Post » Wed Feb 03, 2016 11:03 am

You can use the .asJSON expression to get a copy of a object's state, then you can use the "load from json" action to load it later.

One way to utilize that is to save it to a global variable on the end of one layout and load it at the start of another. Or another idea would be to make the object global so it wouldn't be destroyed.

If you don't want the warmup at all then you could temporarily add a edit box and set it's text to the particles.asjson once they cover the screen. Next copy that text to your favorite text editor and replace all the " with '. Then put " around the whole thing, it is now a valid text that can be used expressions. So you can make it load that into the object at the start of the layout.
B
94
S
33
G
113
Posts: 5,353
Reputation: 73,267

Post » Wed Feb 03, 2016 12:36 pm

Wow great ideas! Thank you @R0J0hound
B
11
S
3
G
2
Posts: 76
Reputation: 1,891


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests