Guest User

Encounter

a guest
Feb 29th, 2020
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. -- A basic encounter script skeleton you can copy and modify for your own creations.
  2.  
  3. music = "knifetrousle" --Either OGG or WAV. Extension is added automatically. Uncomment for custom music.
  4. encountertext = "Chara bloquea el camino!" --Modify as necessary. It will only be read out in the action select screen.
  5. nextwaves = {}
  6. arenasize = {155, 130}
  7.  
  8. enemies = {
  9. "Chara (es)"
  10. }
  11.  
  12. enemypositions = {
  13. {0, 0}
  14. }
  15. attacknum = 0
  16. caja = 0
  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_chaserorb"}
  20.  
  21. function EncounterStarting()
  22. -- If you want to change the game state immediately, this is the place.
  23. require "Animations/animchara"
  24. Player.name = "FRISK"
  25. end
  26.  
  27. function EnemyDialogueStarting()
  28. -- Good location for setting monster dialogue depending on how the battle is going.
  29. end
  30.  
  31. function EnemyDialogueEnding()
  32. attacknum = attacknum + 1
  33. if attacknum == 1 then
  34. nextwaves = {"wave1"}
  35. elseif attacknum == 2 then
  36. nextwaves = {"wave2"}
  37. end
  38. end
  39.  
  40. function DefenseEnding() --This built-in function fires after the defense round ends.
  41. end
  42.  
  43. function HandleSpare()
  44. State("ENEMYDIALOGUE")
  45. end
  46.  
  47. function HandleItem(ItemID)
  48. BattleDialog({"Selected item " .. ItemID .. "."})
  49. end
Add Comment
Please, Sign In to add comment