Advertisement
Guest User

Untitled

a guest
Feb 26th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. make new object obj_particle or something
  2. set sprite as badly drawn 8x8 white blob
  3.  
  4. CREATE:
  5.  
  6. image_alpha = 0.6        //starting transparency
  7. alphaMod = random_range(0.002,0.005)        //how much the particle fades over time
  8. image_xscale = random_range(0.6,1.4)         //random scale
  9. image_yscale = image_xscale
  10. vspeed = -random_range(1,5)         //random speed
  11. friction = random_range(0.005,0.01)      //how much the particle slows over time
  12. amp = 0         //sine wave width
  13. freq = vspeed * 20       //sine wave speed, larger is slower
  14.  
  15. STEP:
  16.  
  17. image_alpha -= alphaMod      //particle becomes more transparent
  18. x = x + amp*sin(y/freq);        //sine function
  19. amp = vspeed/random_range(1,6)
  20. //path seems to randomly change in the original UT so this brings it closer to that
  21.  
  22. if image_alpha <= 0 {
  23.     instance_destroy()      //bruh
  24. }
  25.  
  26. OUTSIDE ROOM:
  27.  
  28. instance_destroy()
  29.  
  30.  
  31. that's pretty much it, now you have to set up a spawner instance which will spawn the particles
  32. between every 1 to 2 seconds, so random_range(1,2) * 60
  33.  
  34. tweak the rest till it's good
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement