• Please note that we've updated the Mount & Blade II: Bannerlord save file system which requires you to take certain steps in order for your save files to be compatible with e1.7.1 and any later updates. You can find the instructions here.

Particle Problem

Users who are viewing this thread

Rydell

Regular
WB
Hey!
Recently I wanted to make Lightning Strike particle but I have small issue.
The Particle just keeps spawning and spawning with about 0.1sec intervals for about 10 seconds in same place.
I set only 1 particle, and life is set to 0.1.
How could I fix this
The code looks like this
Code:
    ("rydell_lightning", psf_billboard_2d|psf_2d_turbulance, "prt_rydell_lightning",
     1, 0.01, 0, 0, 0.1, 0.1,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0.4, 0.4), (0.1, 0.1),        #alpha keys
     (0.7, 0.7), (1, 1),      #red keys
     (1, 1), (1, 1),       #green keys
     (1, 1),   (1, 1),      #blue keys
     (20, 100), (0, 0),   #scale keys
     (0.1, 1, 0.1),      #emit box size
     (0, 0, 0),               #emit velocity
     0.0,                       #emit dir randomness
     0,                       #rotation speed
     0        
    ),
]
 

burspa

Regular
#num particles is per second(I think it's slightly faster to for add new? Untested). So particle_system_add_new will spawn a whole bunch as you found out.

You can use particle_system_burst (particle_system_burst, "psys_", pos, 1), <- this last number is the total amount of particles to spawn. In this case 1.

Ok so now say you wanted to work out how to make an effect last 3 seconds.
If your particle system #num parrticles is 2 per second, then bursting (particle_system_burst, "psys_", pos, 6). 6 total particles will take 3 seconds to end.

Hope that makes sense
 

Rydell

Regular
WB
burspa said:
#num particles is per second(I think it's slightly faster to for add new? Untested). So particle_system_add_new will spawn a whole bunch as you found out.

You can use particle_system_burst (particle_system_burst, "psys_", pos, 1), <- this last number is the total amount of particles to spawn. In this case 1.

Ok so now say you wanted to work out how to make an effect last 3 seconds.
If your particle system #num parrticles is 2 per second, then bursting (particle_system_burst, "psys_", pos, 6). 6 total particles will take 3 seconds to end.

Hope that makes sense
That totally does make sense and fixes my issue! Thank you very much!
It did not know that "1" in "particle_system_burst, "psys_", pos, 1" represents amount to spawn, and had this set to 75. I thought it represents the alpha opacity.
Thanks again!
 
Top Bottom