Advertisement
builderman_build

Untitled

Nov 2nd, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. -- A basic encounter script skeleton you can copy and modify for your own creations.
  2.  
  3. music = "Genos_Theme" --Always OGG or WAV. Extension is added automatically. Remove the first two lines for custom music.
  4. encountertext = "Genos engages Arms Mode" --Modify as necessary. It will only be read out in the action select screen.
  5. nextwaves = {"MachineGunBlow"}
  6. wavetimer = 4.0
  7. arenasize = {155, 130}
  8.  
  9. enemies = {
  10. "Genos"
  11. }
  12.  
  13. enemypositions = {
  14. {0, 0}
  15. }
  16.  
  17. -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
  18. possible_attacks = {"MachineGunBlow", "Incinerate"}
  19.  
  20. function EncounterStarting()
  21. -- If you want to change the game state immediately, this is the place.
  22. end
  23.  
  24. function EnemyDialogueStarting()
  25. -- Good location for setting monster dialogue depending on how the battle is going.
  26. -- Example: enemies[1].SetVar('currentdialogue', {"Check it\nout!"}) See documentation for details.
  27. end
  28.  
  29. function EnemyDialogueEnding()
  30. -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
  31. -- This example line below takes a random attack from 'possible_attacks'.
  32. nextwaves = { possible_attacks[math.random(#possible_attacks)] }
  33. end
  34.  
  35. function DefenseEnding() --This built-in function fires after the defense round ends.
  36. encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
  37. end
  38.  
  39. function HandleSpare()
  40. State("ENEMYDIALOGUE") --By default, pressing spare only spares the enemies but stays in the menu. Changing state happens here.
  41. end
  42.  
  43. function HandleItem(ItemID)
  44. BattleDialog({"Selected item " .. ItemID .. "."})
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement