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 = "Menu" --Either OGG or WAV. Extension is added automatically. Uncomment for custom music.
- -- encountertext = "Poseur st!" --Modify as necessary. It will only be read out in the action select screen.
- nextwaves = {"menu"}
- wavetimer = 9999.0
- arenasize = {155, 130}
- enemies = {
- "poseur"
- }
- -- remember. put this on the menu,the encounter and the monster.
- require "retrostorage"
- 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 = {"menu", "bullettest_bouncy", "bullettest_chaseorb"}
- function EncounterStarting()
- -- If you want to change the game state immediately, this is the place.
- State("DEFENDING")
- end
- function EnemyDialogueStarting()
- local intro = GetGlobal("intro")
- if intro == true then
- Audio.Pause()
- introinprogress = true
- enemies[1].SetVar('currentdialogue', {"Well."})
- SetGlobal("intro", false)
- end
- end
- function EnemyDialogueEnding()
- -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
- nextwaves = { possible_attacks[math.random(#possible_attacks)] }
- end
- function DefenseEnding()
- encountertext = RandomEncounterText()
- local intro = GetGlobal("intro")
- if intro == false then
- Audio.Unpause()
- end
- Player.sprite.color = {1, 0, 0}
- end
- function HandleSpare()
- State("ENEMYDIALOGUE")
- end
- function HandleItem(ItemID)
- end
Advertisement
Add Comment
Please, Sign In to add comment