Advertisement
Guest User

Untitled

a guest
Apr 20th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1. -- A basic encounter script skeleton you can copy and modify for your own creations.
  2. -- music = "pelo theme" --Either OGG or WAV. Extension is added automatically. Uncomment for custom music.
  3. encountertext = "Pelo Attacks!" --Modify as necessary. It will only be read out in the action select screen.
  4. nextwaves = {"bullettest_chaserorb"}
  5. wavetimer = 4.0
  6. arenasize = {155, 130}
  7. SetGlobal("intro", true)
  8.  
  9. enemies = {
  10. "Sr Pelo"
  11. }
  12.  
  13. enemypositions = {
  14. {0, 0}
  15. }
  16.  
  17. SetBubbleOffset = {
  18. {-155, 0}
  19. }
  20.  
  21. -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
  22. attack_counter = 0
  23. attack_list = {"fast","green1","greenrandom"}
  24. function EnemyDialogueEnding()
  25. attack_counter = attack_counter + 1
  26. if attack_counter > #attack_list then
  27. attack_counter = 1
  28. end
  29. nextwaves = { attack_list[attack_counter] }
  30. end
  31.  
  32. function EncounterStarting()
  33. -- If you want to change the game state immediately, this is the place.
  34. Player.lv = 1
  35. Player.hp = 20
  36. Player.name = "Kizuna"
  37. Audio.LoadFile("pelo theme")
  38. end
  39.  
  40. function EnemyDialogueStarting()
  41. -- Good location for setting monster dialogue depending on how the battle is going.
  42. local intro = GetGlobal("intro") --updates the variable "intro" everytime the EnemyDialogueStarting() function is triggered
  43. if intro == true then
  44. enemies[1].SetVar('currentdialogue', {"[noskip]As Long As Your[color:1eff00]GREEN[color:000000] your\nAss Can't Escape!.", "[noskip]computers are\nhumming,[w:20]\nlights are dimmed...", "[noskip]on days like these,[w:20]\nkids like you..."})
  45. SetGlobal("intro", false) -- sets the variable "intro" to false so that this line of dialogue only plays once
  46. end
  47. end
  48.  
  49. function EnemyDialogueEnding()
  50. -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
  51. attack_counter = 0
  52. attack_list = {"fast","green1","greenrandom"}
  53. function EnemyDialogueEnding()
  54. attack_counter = attack_counter + 1
  55. if attack_counter > #attack_list then
  56. attack_counter = 1
  57. end
  58. nextwaves = { attack_list[attack_counter] }
  59. end
  60. end
  61.  
  62. function DefenseEnding() --This built-in function fires after the defense round ends.
  63. encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
  64. end
  65.  
  66. function HandleSpare()
  67. State("ENEMYDIALOGUE")
  68. end
  69.  
  70. function HandleItem(ItemID)
  71. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement