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.
- Timers = require "timer"
- require "Animations/nomercy"
- require "FaakeUi"
- require "vsprite"
- music = "Devilovania OST - AUTOPHOBIA1" --Either OGG or WAV. Extension is added automatically. Uncomment for custom music.
- encountertext = "You Know The Drill..." --Modify as necessary. It will only be read out in the action select screen.
- nextwaves = {"bullettest_chaserorb"}
- wavetimer = 11.0
- arenasize = {155, 130}
- starttime = Time.time
- currenttime = 0
- enemies = {
- "poseur",
- "HIS"
- }
- enemypositions = {
- {-10, 80},
- {0, 20}
- }
- SetGlobal("intro", true)
- -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
- possible_attacks = {"Blasters"}
- function EncounterStarting()
- -- If you want to change the game state immediately, this is the place.
- require "Libraries/objectdefs"
- require "Libraries/colortoys"
- require "Libraries/objectdefs2"
- require "Libraries/courage"
- Player.name = "Chara/Tom"
- Player.lv = 20
- Player.hp = 261
- Player.atk = 243
- Player.def = 141
- Player.lv = Player.lv + 60
- Player.SetMaxHPShift(-78. , 0)
- Player.Heal(99999)
- Audio.Pitch(1)
- Audio.Volume(1)
- SetGlobal("wavetimer",10.0)
- timer = 0
- framecounter = 0
- SetGlobal("courage", true)
- SetGlobal("poseur","close")
- SetGlobal("poseurDead",false)
- SetGlobal("sparedposeur",false)
- SetGlobal("sparingposeur",10)
- SetGlobal("revived",false)
- SetGlobal("HIS","hidden")
- SetGlobal("HISDead",false)
- switchrevive = false
- switchrevive2 = false
- --Include the animation Lua file. It's important you do this in EncounterStarting, because you can't create sprites before the game's done loading.
- --Be careful that you use different variable names as you have here, because the encounter's will be overwritten otherwise!
- --You can also use that to your benefit if you want to share a bunch of variables with multiple encounters.
- end
- function Anger() -- not used for anything yet just plannning ahead
- Audio.Pause()
- Player.Heal(10)
- Audio.LoadFile("Revenge")
- end
- function Update()
- --By calling the AnimateSans() function on the animation Lua file, we can create some movement!
- library.Update()
- if GetGlobal("revived") == false then
- else
- if switchrevive == false then
- enemies[2].Call("Activate")
- enemies[1].Call("Deactivate")
- switchrevive = true
- end
- end
- end
- function EnemyDialogueStarting()
- --Player.ForceAttack(1, 1)
- SetGlobal("placingposeur", 0)
- if switchrevive2 == false then
- encountertext = "[noskip][color:ff0000]WHY SO ANGRY?", "[noskip][color:ff0000]In MY Absolute Way..."
- switchrevive2 = true
- 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'.
- if GetGlobal("revived") == true then
- if enemies[2]["hp"] <= 200 then
- encountertext = "Its The Final Showdown/n[color:ff0000]Get Ready for HIS Attacks"
- else
- encountertext = RandomEncounterText()
- end
- else
- encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
- end
- SetGlobal("poseur","close")
- SetGlobal("HIS", "normal")
- nextwaves = { possible_attacks[math.random(#possible_attacks)] }
- SetGlobal("placingposeur", -1)
- end
- function DefenseEnding() --This built-in function fires after the defense round ends.
- SetGlobal("HIS", "normal")
- --currentdialogue = {"..."} --This built-in function gets a random encounter text from a random enemy.
- end
- function HandleSpare()
- if GetGlobal("revived") == false and GetGlobal("sparingposeur") == 1 then
- SetGlobal("sparedposeur", true)
- SetGlobal("sparingposeur", 0)
- end
- State("ENEMYDIALOGUE")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement