Advertisement
Guest User

encounter song error

a guest
Jun 9th, 2020
540
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. -- A basic encounter script skeleton you can copy and modify for your own creations.
  2.  
  3. -- music = "anothermedium" --Always OGG. Extension is added automatically. Remove the first two lines for custom music.
  4. encountertext = "Fax Is Ready To Defeat\nYou!" --Modify as necessary. It will only be read out in the action select screen.
  5. nextwaves = {"blank"}
  6. wavetimer = 4.0
  7. arenasize = {155, 130}
  8.  
  9. enemies = {
  10. "poseur"
  11. }
  12.  
  13. enemypositions = {
  14. {0, 0}
  15. }
  16.  
  17. SetGlobal("intro",true)
  18.  
  19. -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
  20. possible_attacks = {"bullettest_blasters", "bullettest_blue", "bullettest_chaserorb", "bullettest_gasterblastersR", "Co", "Filmos-slice", "bullet_warning", "bullettest_slice"}
  21.  
  22. function EncounterStarting()
  23. -- If you want to change the game state immediately, this is the place.
  24. State("ENEMYDIALOGUE")
  25. Player.lv = 18
  26. Player.hp = 99
  27. Player.name = "Killer"
  28. Audio.Stop()
  29. end
  30.  
  31. function EnemyDialogueStarting()
  32. local intro = GetGlobal("intro")
  33. if intro == true then
  34. enemies[1].SetVar('currentdialogue', {"[waitall:3]Hello\n[waitall:8]traitor...", "[waitall:2]I see..[waitall:4]\nyou have\n a knife", "[w:30]", "[waitall:3]you\nkilled\nthem[waitall;4]...", "[waitall:8]You\nkilled\nthem all", "its time\nto pay\nHOOMAN"})
  35. SetGlobal("intro", false)
  36.  
  37. end
  38.  
  39. function EnemyDialogueEnding()
  40. -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
  41. -- This example line below takes a random attack from 'possible_attacks'.
  42. nextwaves = { possible_attacks[math.random(#possible_attacks)] }
  43. Audio.LoadFile ("anothermedium")
  44.  
  45.  
  46. function DefenseEnding() --This built-in function fires after the defense round ends.
  47. encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
  48. end
  49.  
  50. function HandleSpare()
  51. State("ENEMYDIALOGUE")
  52. end
  53.  
  54. function HandleItem(ItemID)
  55. if ItemID == "DOGTEST1" then
  56. BattleDialog({"You Throw The FireStick At Fax[w:10]\nthough Fax is Amuned To Fire! "})
  57. Player.Heal(5)
  58. elseif ItemID == "DOGTEST2" then
  59. BattleDialog({"You just lick a Test Dog. Yuck!\nYou recovered 5 HP! "})
  60. Player.Heal(5)
  61. elseif ItemID == "DOGTEST3" then
  62. BattleDialog({"You just lick a Test Dog. Yuck!\nYou recovered 5 HP! "})
  63. Player.Heal(5)
  64. elseif ItemID == "DOGTEST4" then
  65. BattleDialog({"You just lick a Test Dog. Yuck!\nYou recovered 5 HP! "})
  66. Player.Heal(5)
  67. elseif ItemID == "DOGTEST5" then
  68. BattleDialog({"You just lick a Test Dog. Yuck!\nYou recovered 5 HP! "})
  69. Player.Heal(5)
  70. elseif ItemID == "DOGTEST6" then
  71. BattleDialog({"You just lick a Test Dog. Yuck!\nYou recovered 5 HP! "})
  72. Player.Heal(5)
  73. elseif ItemID == "DOGTEST7" then
  74. BattleDialog({"You just lick a Test Dog. Yuck!\nYou recovered 5 HP! "})
  75. Player.Heal(5)
  76. elseif ItemID == "DOGTEST8" then
  77. BattleDialog({"You just lick a Test Dog. Yuck!\nYou recovered 5 HP! "})
  78. Player.Heal(5)
  79. end
  80. end
  81.  
  82. function EnemyDialogueEnding()
  83. attack_order = {'bullettest_blue',
  84. 'bullettest_gasterblastersR',
  85. 'Co'}
  86. attacknum = 1
  87. end end end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement