ForbodingAngel

Untitled

Aug 8th, 2015
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. local base = piece "base"
  2.  
  3. local SIG_STEAL = 0
  4. local riseSpeed = 6.5
  5. local x,y,z = Spring.GetUnitPosition(unitID)
  6.  
  7. local function StolenThread(progress)
  8. Signal(SIG_STEAL)
  9. SetSignalMask(SIG_STEAL)
  10. while true do
  11. Spring.PlaySoundFile("sounds/digitout.wav", 1, x, y, z)
  12. Spring.SpawnCEG("dirtfling", x, y, z)
  13. Sleep(128)
  14. end
  15. end
  16.  
  17. function StartBeingStolen(progress)
  18. StartThread(StolenThread)
  19. Move(base, y_axis, -10 + riseSpeed*progress/30)
  20. Move(base, y_axis, 20, riseSpeed)
  21. end
  22.  
  23. function StopBeingStolen(progress)
  24. Signal(SIG_STEAL)
  25. Move(base, y_axis, -10 + riseSpeed*progress/30)
  26. Move(base, y_axis, -10 + riseSpeed*progress/30, 0.0001)
  27. end
  28.  
  29.  
  30. function script.Create()
  31. Move(base, y_axis, -10)
  32. end
  33.  
  34. function script.Killed(recentDamage, maxHealth)
  35. return 0
  36. end
Advertisement
Add Comment
Please, Sign In to add comment