Advertisement
NSKuber

Edited end CS script part

Jul 20th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.89 KB | None | 0 0
  1.   local fTime = 0
  2.   local fTempTimer = 0
  3.   while true do
  4.     for i=1, #Rocks do
  5.       local Rock = Rocks[i]
  6.       local vRock = Rock:GetPlacement():GetVect()
  7.       local vDistance = vRock-vMarker
  8.       local fSwapDistance = 10
  9.       if mthRndF()<0.2 then
  10.         --local fFrontVelocity = Rock:GetFrontVelocity()
  11.         --Rock:SetFrontVelocity(-fFrontVelocity)
  12.         Rock:SetRotationalVelocity(mthVector3f(Rnd(10), Rnd(10), Rnd(10)))
  13.         local fFrontVelocity = Rnd(0.1)
  14.         Rock:SetFrontVelocity(fFrontVelocity)      
  15.       end
  16.       if (mthAbsF(vDistance.x)>fSwapDistance or
  17.           mthAbsF(vDistance.y)>fSwapDistance or
  18.           mthAbsF(vDistance.z)>fSwapDistance) then
  19.          local fFrontVelocity = Rock:GetFrontVelocity()
  20.           Rock:SetFrontVelocity(-fFrontVelocity)
  21.       end
  22.       while (fTempTimer < 0.1) do
  23.         fTempTimer=fTempTimer+Wait(CustomEvent("OnStep")):GetTimeStep()
  24.       end
  25.       fTempTimer=fTempTimer-0.1
  26.       fTime=fTime+0.1
  27.       if fTime>=32 and fTime<32.1 then
  28.         worldInfo:StartTextScroll(ptrScrollText, 150);
  29.       end
  30.       if fTime>=152 and fTime<152.1 then
  31.         Letter_01:Appear()
  32.         Letter_01_Particle:Start()
  33.         Letter_01_Sound:PlayOnce()
  34.         Wait(Delay(0.2))
  35.         Letter_02:Appear()
  36.         Letter_02_Particle:Start()
  37.         Letter_02_Sound:PlayOnce()
  38.         Wait(Delay(0.2))
  39.         Letter_03:Appear()
  40.         Letter_03_Particle:Start()
  41.         Letter_03_Sound:PlayOnce()
  42.         Wait(Delay(0.2))
  43.         Letter_04:Appear()
  44.         Letter_04_Particle:Start()
  45.         Letter_04_Sound:PlayOnce()
  46.         Wait(Delay(0.2))
  47.         Letter_05:Appear()
  48.         Letter_05_Particle:Start()
  49.         Letter_05_Sound:PlayOnce()
  50.         Wait(Delay(0.2))
  51.         Letter_06:Appear()
  52.         Letter_06_Particle:Start()
  53.         Letter_06_Sound:PlayOnce()
  54.         Wait(Delay(0.2))
  55.         Letter_07:Appear()
  56.         Letter_07_Particle:Start()
  57.         Letter_07_Sound:PlayOnce()
  58.         Wait(Delay(0.2))
  59.         Letter_08:Appear()
  60.         Letter_08_Particle:Start()
  61.         Letter_08_Sound:PlayOnce()
  62.         Wait(Delay(0.2))
  63.         Letter_09:Appear()
  64.         Letter_09_Particle:Start()
  65.         Letter_09_Sound:PlayOnce()
  66.         Wait(Delay(0.2))
  67.         Letter_10:Appear()
  68.         Letter_10_Particle:Start()
  69.         Letter_10_Sound:PlayOnce()
  70.         Wait(Delay(0.2))
  71.         Letter_11:Appear()
  72.         Letter_11_Particle:Start()
  73.         Letter_11_Sound:PlayOnce()
  74.         Wait(Delay(0.2))  
  75.         Letter_12:Appear()
  76.         Letter_12_Particle:Start()
  77.         Letter_12_Sound:PlayOnce()
  78.         Wait(Delay(0.2))
  79.         Letter_13:Appear()
  80.         Letter_13_Particle:Start()
  81.         Letter_13_Sound:PlayOnce()  
  82.       end                                                                                                
  83.       if fTime>=168 then
  84.         SignalEvent("End game")
  85.       end
  86.     end
  87.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement