Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- A basic encounter script skeleton you can copy and modify for your own creations.
- music = "Metal Cruncher" --Always OGG. Extension is added automatically. Remove the first two lines for custom music.
- encountertext = "Mettaton chase you!" --Modify as necessary. It will only be read out in the action select screen.
- nextwaves = {"bullettest_chaserorb"}
- wavetimer = 4.0
- arenasize = {155, 130}
- enemies = {
- "UnMetta"
- }
- enemypositions = {
- {0, 22}
- }
- -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
- possible_attacks = {"bullettest_bouncy", "bullettest_chaserorb", "bullettest_touhou"}
- function EncounterStarting()
- -- If you want to change the game state immediately, this is the place.
- State("ENEMYDIALOGUE")
- require "Animations/unmetta_anim"
- end
- function EnemyDialogueStarting()
- -- Good location for setting monster dialogue depending on how the battle is going.
- -- Example: enemies[1].SetVar('currentdialogue', {"Check it\nout!"}) See documentation for details.
- dialogueCount = dialogueCount + 1
- if dialogueCount == 1 then
- enemies[1].SetVar('currentdialogue', {"Hello Darling!"}
- if dialogueCount == 2 then
- enemies[1].SetVar('currentdialogue', {"I told\nyou im\na monster"}
- if dialogueCount == 3 then
- enemies[1].SetVar('currentdialogue', {"You don't\ngonna\npass\nthis area"}
- if GetGlobal('ex') == true then
- enemies[1].SetVar('currentdialogue', {"[SetSprite("extalkingdemo")]Well...[SetSprite("ex")]", "[SetSprite("extalkingdemo")]This part\nis not\nfinished[SetSprite("ex")]", "[SetSprite("extalkingdemo")]Goodbye!", "[func:State,DONE]"})}
- end
- function EnemyDialogueEnding()
- -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
- -- This example line below takes a random attack from 'possible_attacks'.
- nextwaves = { possible_attacks[math.random(#possible_attacks)] }
- end
- function DefenseEnding() --This built-in function fires after the defense round ends.
- encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
- end
- function HandleSpare()
- if GetGlobal('ex') == true then
- enemies[1].SetVar("canspare",true)
- enemies[1].SetVar("def",-200) --or other defense number
- end
- function HandleItem(ItemID)
- BattleDialog({"Selected item " .. ItemID .. "."})
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement