Guest User

Untitled

a guest
Apr 8th, 2016
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. -- A basic encounter script skeleton you can copy and modify for your own creations.
  2.  
  3. music = "spear of justice"
  4. encountertext = "Neera attacks!"
  5. nextwaves = {"bullettest_chaserorb"}
  6. wavetimer = 4.0
  7. arenasize = {155, 130}
  8.  
  9. enemies = {
  10. "undyne"
  11. }
  12.  
  13. enemypositions = {
  14. {-25, -10}
  15. }
  16.  
  17. function Update()
  18. AnimateUndyne()
  19. end
  20.  
  21. possible_attacks = {"bullettest_bouncy", "bullettest_chaserorb", "bullettest_touhou", "spear"}
  22.  
  23. function EncounterStarting()
  24. require "Animations/Undyne"
  25. Player.name = "Frisk"
  26. Player.lv = 8
  27. Player.hp = 99
  28. end
  29.  
  30. function EnteringState(newstate,oldstate)
  31. if oldstate == "ATTACKING" then
  32. enemies[1].Call("SetSprite","blank")
  33. animtimer = 0
  34. legs.alpha = 1
  35. pants.alpha = 1
  36. leftarm.alpha = 1
  37. armor.alpha = 1
  38. rightarm.alpha = 1
  39. hair.alpha = 1
  40. face.alpha = 1
  41. end
  42. end
  43.  
  44. function EnemyDialogueStarting()
  45. -- Good location for setting monster dialogue depending on how the battle is going.
  46. end
  47.  
  48. function EnemyDialogueEnding()
  49. -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
  50. -- This example line below takes a random attack from 'possible_attacks'.
  51. nextwaves = { possible_attacks[math.random(#possible_attacks)] }
  52. end
  53.  
  54. function DefenseEnding() --This built-in function fires after the defense round ends.
  55. end
  56.  
  57. function HandleSpare()
  58. State("ENEMYDIALOGUE")
  59. end
  60.  
  61. function HandleItem(ItemID)
  62. BattleDialog({"Selected item " .. ItemID .. "."})
  63. end
Advertisement
Add Comment
Please, Sign In to add comment