How do I "warm up" a particle object.

Get help using Construct 2

Post » Wed Sep 07, 2016 8:09 am

In Unity there was a warm up option, which basically made it look like the particle system was already running when the screen fades in on a scene. Is there a way to do the same in Consturct? Like, when the layout loads you don't see the waterfall being turned on - of sorts/for example - but already see a waterfall running healthily and happily as you would expect.

Thanks, & cheers!
B
18
S
3
Posts: 65
Reputation: 994

Post » Wed Sep 07, 2016 1:56 pm

I don't remember seeing a particle object already running when I loaded a scene in C2. :(

If I was to make a waterfall that was already turned on, I would have done this.

1. Create a new scene with a waterfall and run it.
2. Video capture the waterfall and remove the background, if needed.
3. Export the image as PNG and bring it into C2 as animation.

Then I would either..

4. Arrange the scene so that the waterfall's animation will run for a few seconds before particles take over.

or

5. Use that PNG animation without a particle object in game.

Another method I could think of is this

1. Create a cut scene in a layer above the waterfall let the particle waterfall run in the background first.
2. Remove the cut scene after a few seconds.
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Wed Sep 07, 2016 2:08 pm

Hey, thanks. These methods would do it, but the thing is the waterfall example was more of a...well, example. This won't really do it if, well, I have it rain using particles, cause that means everytime I change layouts in a, lets say rainy forest, I will witness the rain beggining to fall down.

Hmmmm.... gotta figure it out :).

Cheers
B
18
S
3
Posts: 65
Reputation: 994

Post » Wed Sep 07, 2016 3:45 pm

You're welcome, TheWindmiller. :mrgreen:

If it's rain, that can be arranged by the Rain & Splash Effect easily.

https://www.scirra.com/tutorials/1368/r ... ash-effect
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Wed Sep 07, 2016 4:44 pm

In your game wait till the particles are "warmed up" then set a textbox to particles.asjson. You can then copy the text from it. Next close your game, go to the event sheet and add the action "load from json" and paste the copied text and put quotes around it. Now when you run the layout the particles will already be running.

The text you paste may need a little tweaking. Namely replace the " with '. Then you can put " at the start and end.
B
92
S
32
G
109
Posts: 5,291
Reputation: 70,993

Post » Wed Sep 07, 2016 5:06 pm

Thank you for the update, R0J0hound. :mrgreen:

I tried it, but I'm getting an error message.

I must have done something wrong, but I couldn't find the cause for the error.

Could you check and let us know what might have wrong, please? :mrgreen:

https://www.dropbox.com/s/jl6tfc4vkh0y5 ... .capx?dl=0
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Wed Sep 07, 2016 7:04 pm

It'll be a while before I can look at it. Maybe next Sunday at the earliest.
B
92
S
32
G
109
Posts: 5,291
Reputation: 70,993

Post » Wed Sep 07, 2016 7:49 pm

Quotation marks error..

Image

json should look like

Code: Select all
"{""c2"":true,""w"":{""x"":180,""y"":450,""w"":128,""h"":128,""l"":719120155086956,""zi"":0,""hX"":0}...


not

Code: Select all
"{'c2':true,'w':{'x':180,'y':450,'w':128,'h':128,'l':719120155086956,'zi':0,'hX':0}..
B
66
S
24
G
7
Posts: 1,514
Reputation: 11,039

Post » Wed Sep 07, 2016 8:23 pm

Gmoney wrote:Could you check and let us know what might have wrong, please?



You have to ....
Action ... sprite particles .. set from json .. the json string

(not load game from json)

To get that string, it is probaly easyer to copy the string in the debugger from the textbox. Then return to your project and past that string where it belongs.

It is not meant to keep that textbox, that is just a tempory placeholder to harvest that json string. Delete it.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Sep 07, 2016 8:30 pm

R0J0hound wrote:It'll be a while before I can look at it. Maybe next Sunday at the earliest.


Next Sunday? :shock: ok.
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 34 guests