Advertisement
Guest User

04 - Animation.lua

a guest
Aug 21st, 2020
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.40 KB | None | 0 0
  1. -- An animation demo with a rotating Sans head.
  2.  
  3. music = "SKATE_OR_DIE" --Always OGG. Extension is added automatically. Remove the first two lines for custom music.
  4. encountertext = "You don't feel like you're\rgoing to have a rad time." --Modify as necessary. It will only be read out in the action select screen.
  5. nextwaves = {"bullettest_chaserorb"}
  6. wavetimer = 4.0
  7. arenasize = {155, 130}
  8. autolinebreak = true
  9.  
  10. enemies = {
  11. "sans"
  12. }
  13.  
  14. enemypositions = {
  15. {0, 0}
  16. }
  17.  
  18. -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
  19. possible_attacks = {"bullettest_bouncy", "bullettest_chaserorb", "bullettest_touhou"}
  20.  
  21. function EncounterStarting()
  22.     require "Animations/sans_anim"
  23.     require "Libraries/blue"
  24.     require "Libraries/objectdefs"
  25. end
  26.  
  27. function Update()
  28.     AnimateSans()
  29. end
  30.  
  31. function EnemyDialogueEnding()
  32.     -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
  33.     -- This example line below takes a random attack from 'possible_attacks'.
  34.     nextwaves = { possible_attacks[math.random(#possible_attacks)] }
  35. end
  36.  
  37. function DefenseEnding() --This built-in function fires after the defense round ends.
  38.     encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
  39. end
  40.  
  41. function HandleSpare()
  42.     State("ENEMYDIALOGUE")
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement