Guest User

script

a guest
Jun 29th, 2013
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. -- rumbleboost modified from spuck deboop script
  2. -- replaces turbo sound with meatier one mixed from 10 different samples from freesounds.
  3.  
  4. arkoz = arkoz or {}
  5.  
  6. local function load_rumbleboost()
  7. local sounds = {
  8. "plugins/rumbleboost/sounds/rumble1.ogg",
  9. "plugins/rumbleboost/sounds/rumble2.ogg"
  10. }
  11.  
  12. for i,v in pairs(sounds) do
  13. gksound.GKLoadSound{soundname="rumbleboost"..tostring(i), filename=v}
  14. end
  15.  
  16. local gkps = gksound.GKPlaySound
  17. function gksound.GKPlaySound(name, vol)
  18. if name == "ship.engine.turbo" then
  19. name = "rumbleboost"..math.random(#sounds)
  20. end
  21. gkps(name, vol)
  22. end
  23. end
  24.  
  25. -- rumbleboost should only be loaded once because ReloadInterface won't reset gkps
  26. if not arkoz.rumbleboost then
  27. load_rumbleboost()
  28. end
  29.  
  30. arkoz.rumbleboost = true
Advertisement
Add Comment
Please, Sign In to add comment