Advertisement
Comba

Untitled

May 21st, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. Hey I want to create an dialogue at the beginning but the posuer just says: Random Dialogue 3
  2.  
  3.  
  4.  
  5.  
  6. -- A basic encounter script skeleton you can copy and modify for your own creations.
  7.  
  8. -- music = "Asriel" --Always OGG. Extension is added automatically. Remove the first two lines for custom music.
  9. encountertext = "Poseur strikes a pose!" --Modify as necessary. It will only be read out in the action select screen.
  10. nextwaves = {"bullettest_chaserorb"}
  11. wavetimer = 4.0
  12. arenasize = {155, 130}
  13.  
  14. enemies = {
  15. "poseur"
  16. }
  17.  
  18. enemypositions = {
  19. {0, 0}
  20. }
  21.  
  22. SetGlobal("Intro", true)
  23.  
  24. -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
  25. possible_attacks = {"bullettest_bouncy", "bullettest_chaserorb", "bullettest_touhou"}
  26.  
  27. function EncounterStarting()
  28. -- If you want to change the game state immediately, this is the place.
  29. State("ENEMYDIALOGUE")
  30. Player.lv = 19
  31. Player.hp = 92
  32. Player.name = "Chara"
  33. Audio.Stop()
  34. end
  35.  
  36. function EnemyDialogueStarting()
  37. local intro = GetGlobal("intro")
  38. if intro == true then
  39. enemies[1].SetVar('currentdialogue', {"[waitall]Hey Chara!", "[noskip]Well I have to stop you...", "[instant]Because if I don't you will kill them all", "[font:sans]Okay just start..."})
  40. SetGlobal("intro", false)
  41. end
  42. end
  43.  
  44. function EnemyDialogueEnding()
  45. -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
  46. -- This example line below takes a random attack from 'possible_attacks'.
  47. nextwaves = { possible_attacks[math.random(#possible_attacks)] }
  48. end
  49.  
  50. function DefenseEnding() --This built-in function fires after the defense round ends.
  51. encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
  52. end
  53.  
  54. function HandleSpare()
  55. State("ENEMYDIALOGUE")
  56. end
  57.  
  58. function HandleItem(ItemID)
  59. BattleDialog({"Selected item " .. ItemID .. "."})
  60. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement