Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- make new object obj_particle or something
- set sprite as badly drawn 8x8 white blob
- CREATE:
- image_alpha = 0.6 //starting transparency
- alphaMod = random_range(0.002,0.005) //how much the particle fades over time
- image_xscale = random_range(0.6,1.4) //random scale
- image_yscale = image_xscale
- vspeed = -random_range(1,5) //random speed
- friction = random_range(0.005,0.01) //how much the particle slows over time
- amp = 0 //sine wave width
- freq = vspeed * 20 //sine wave speed, larger is slower
- STEP:
- image_alpha -= alphaMod //particle becomes more transparent
- x = x + amp*sin(y/freq); //sine function
- amp = vspeed/random_range(1,6)
- //path seems to randomly change in the original UT so this brings it closer to that
- if image_alpha <= 0 {
- instance_destroy() //bruh
- }
- OUTSIDE ROOM:
- instance_destroy()
- that's pretty much it, now you have to set up a spawner instance which will spawn the particles
- between every 1 to 2 seconds, so random_range(1,2) * 60
- tweak the rest till it's good
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement