Dusty_Wings

E2 Snow

Apr 9th, 2016
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
E 1.31 KB | None | 0 0
  1. @name FailCake Snow V1
  2. @persist Back S:array Height I X Y E:entity A Z Range
  3.  
  4. if(first()){
  5. Weld = entity():isWeldedTo()
  6. E = entity()  
  7. E:setColor(255,255,255,0)
  8. E:setMaterial("models/debug/debugwhite")
  9. Weld:setColor(255,255,255,255)
  10. Weld:setMaterial("models/debug/debugwhite")
  11.  
  12. hint("Made by Failcake & Jack",7)  
  13.  
  14.     ######### SETTINGS #########
  15.     Range = 100
  16.     Height = 300
  17.     ######### SETTINGS #########
  18.    
  19.     runOnTick(1)
  20.     A = 0
  21. }
  22.  
  23.  
  24.  
  25. Back+=0.1
  26.  
  27. if(Back == 2){
  28. E:soundPlay(1,999,"music/portal_self_esteem_fund.mp3")  
  29. soundPitch(1,100)  
  30. }
  31. if(Back >= 300){
  32. Back = 0
  33. soundStop(1)  
  34. }
  35.  
  36.  
  37. if(A < 50)
  38. {
  39.     timer("spawn",500)
  40. }
  41.  
  42. if(clk("spawn"))
  43. {
  44.     X = random(E:pos():x() - Range,E:pos():x() + Range)
  45.     Y = random(E:pos():y() - Range,E:pos():y() + Range)
  46.     A++
  47.     holoCreate(A)
  48.     holoModel(A,"hqicosphere2")
  49.     holoScale(A,vec(0.5,0.5,0.5))
  50.     holoPos(A,vec(X,Y,E:pos():z() + Height))
  51.     holoAlpha(A,200)
  52.     holoMaterial(A,"models/debug/debugwhite")
  53.     S:pushEntity(holoEntity(A))  
  54. }
  55.  
  56. for(I = 1,S:count())
  57. {
  58.     Z = S[I,entity]:pos():z() - 0.5
  59.     holoPos(I,vec(S[I,entity]:pos():x(),S[I,entity]:pos():y(),Z))
  60.     if(Z < E:pos():z()) {holoPos(I,vec(S[I,entity]:pos():x(),S[I,entity]:pos():y(),E:pos():z() + Height))}
  61. }
  62. if(duped()){selfDestructAll()}
Add Comment
Please, Sign In to add comment