Advertisement
Guest User

[INSERT NAME HERE]

a guest
Jan 4th, 2020
540
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. -- A basic encounter script skeleton you can copy and modify for your own creations.
  2.  
  3. -- music = "shine_on_you_crazy_diamond" --Either OGG or WAV. Extension is added automatically. Uncomment for custom music.
  4. encountertext = "Papyrus is sparing you." --Modify as necessary. It will only be read out in the action select screen.
  5. nextwaves = {"outro"}
  6. wavetimer = math.huge
  7. arenasize = {155, 130}
  8. enemies = {"papyrus"}
  9. enemypositions = {{0, 0}}
  10.  
  11. function EncounterStarting()
  12. -- If you want to change the game state immediately, this is the place.
  13. Audio.StopAll()
  14. end
  15.  
  16. function EnemyDialogueStarting()
  17. -- Good location for setting monster dialogue depending on how the battle is going.
  18. end
  19.  
  20. function EnemyDialogueEnding()
  21. State("ACTIONSELECT")
  22. end
  23.  
  24. function DefenseEnding() --This built-in function fires after the defense round ends.
  25. encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
  26. end
  27.  
  28. function HandleSpare()
  29. State("ENEMYDIALOGUE")
  30. end
  31.  
  32. function HandleItem(ItemID)
  33. BattleDialog({"Selected item " .. ItemID .. "."})
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement