Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --For usage, check out the encounter Lua's EncounterStarting() and Update() functions.
- -- First, we can create the torso, legs and head.
- CyanSoul = CreateSprite("a_nothing")
- Toriel = CreateSprite("a_nothing")
- Flash = CreateSprite("a_nothing")
- --Now we adjust the height for the individual parts so they look more like a skeleton and less like a pile of bones.
- CyanSoul.y = 314
- CyanSoul.x = 600
- CyanSoul.xscale = 1.0
- CyanSoul.yscale = 1.0
- Flash.xscale = 1.0
- Flash.yscale = 1.0
- --Finally, we do some frame-by-frame animation just to show off the feature. You put in a list of sprites,
- --and the time you want a sprite change to take. In this case, it's 1 of a second.
- timer = 0
- frame1 = 1
- frame2 = 1
- spawntimer = 0
- SetGlobal("help",0)
- SetGlobal("revive",0)
- SetGlobal("TrueBattle",0)
- function TorielIntro()
- local help = GetGlobal ("help")
- if help == 1 and frame1 == 1 then
- CyanSoul = CreateSprite("a_cyanSoul")
- CyanSoul.MoveTo(314, 600)
- frame1 = 2
- elseif help == 1 and frame1 <= 333 then
- CyanSoul.y = CyanSoul.y - 0.6
- frame1 = frame1 + 1
- end
- end
- function HideToriel()
- Toriel.alpha = 0
- end
- function RevealToriel()
- Toriel.alpha = 1
- end
- function Sacrifice()
- local revive = GetGlobal ("revive")
- if revive == 1 and frame2 == 1 then
- CyanSoul.MoveTo(314, 400)
- frame2 = 2
- elseif revive == 1 and frame2 <= 360 then
- CyanSoul.y = CyanSoul.y - 0.3
- frame2 = frame2 + 1
- CyanSoul.alpha = CyanSoul.alpha - 0.01
- end
- end
- function AnimateToriel()
- local TrueBattle = GetGlobal ("TrueBattle")
- if TrueBattle == 2 then
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement