shadowm

Untitled

Apr 22nd, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #
  2. # Random earthquake effect when units move.
  3. #
  4.  
  5. [event]
  6. name=moveto
  7. first_time_only=no
  8.  
  9. [lua]
  10. code= <<
  11. local rumble_seed = safe_random("1..100")
  12.  
  13. if rumble_seed % 11 == 0 then -- 9.09% chance
  14. wesnoth.wml_actions.sound({ name = "cave-in.ogg,cave-in.ogg,rumble.ogg" })
  15. end
  16.  
  17. if rumble_seed % 13 == 0 then -- 7.69% chance
  18. wesnoth.wml_actions.quake({ sound = "cave-in.ogg" })
  19. end
  20.  
  21. if rumble_seed % 29 == 0 then -- 3.44% chance
  22. wesnoth.wml_actions.quake({ sound = "rumble.ogg" })
  23. end
  24. >>
  25. [/lua]
  26.  
  27. [allow_undo][/allow_undo]
  28. [/event]
Advertisement
Add Comment
Please, Sign In to add comment