-- A basic encounter script skeleton you can copy and modify for your own creations.
music = "sans" --Always OGG. Extension is added automatically. Remove the first two lines for custom music.
encountertext = "Thanks for watching!" --Modify as necessary. It will only be read out in the action select screen.
nextwaves = {"bullettest_chaserorb"}
wavetimer = 4.0
arenasize = {155, 130}
enemies = {
"oliverex"
}
enemypositions = {
{0, 0}
}
-- 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()
Player.name = "Viewer"
Player.lv = 1
Audio.Play(sans)
State("ENEMYDIALOGUE")
end
function EnemyDialogueStarting()
local intro = GetGlobal("intro") --updates the variable "intro" everytime the EnemyDialogueStarting() function is triggered
if intro == true then
'currentdialogue' "Hey there! I am Oliver EX."
'currentdialogue' "...Unitale doesn't allow apostrophes."
'currentdialogue' "I started this channel up a month ago as Undertale music."
'currentdialogue' "But now I don't want to just do music playlists and stuff."
SetGlobal("intro", false) -- sets the variable "intro" to false so that this line of dialogue only plays once
end
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()
State("ENEMYDIALOGUE")
end
function HandleItem(ItemID)
BattleDialog({"Selected item " .. ItemID .. "."})
end-- your code goes here