Advertisement
OmegaGamingHunters

Update 1.9

Jan 23rd, 2018
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.60 KB | None | 0 0
  1. --For usage, check out the encounter Lua's EncounterStarting() and Update() functions.
  2. -- First, we can create the torso, legs and head.
  3. CyanSoul = CreateSprite("a_nothing")
  4. Toriel = CreateSprite("a_nothing")
  5. Flash = CreateSprite("a_nothing")
  6. --Now we adjust the height for the individual parts so they look more like a skeleton and less like a pile of bones.
  7. CyanSoul.y = 314
  8. CyanSoul.x = 600
  9. CyanSoul.xscale = 1.0
  10. CyanSoul.yscale = 1.0
  11. Flash.xscale = 1.0
  12. Flash.yscale = 1.0
  13. --Finally, we do some frame-by-frame animation just to show off the feature. You put in a list of sprites,
  14. --and the time you want a sprite change to take. In this case, it's 1 of a second.
  15. timer = 0
  16. frame1 = 1
  17. frame2 = 1
  18. spawntimer = 0
  19. SetGlobal("help",0)
  20. SetGlobal("revive",0)
  21. SetGlobal("TrueBattle",0)
  22. function TorielIntro()
  23.     local help = GetGlobal ("help")
  24.     if help == 1 and frame1 == 1 then
  25.         CyanSoul = CreateSprite("a_cyanSoul")
  26.         CyanSoul.MoveTo(314, 600)
  27.         frame1 = 2
  28.     elseif help == 1 and frame1 <= 333 then
  29.         CyanSoul.y = CyanSoul.y - 0.6
  30.         frame1 = frame1 + 1
  31.     end    
  32. end
  33.  
  34. function HideToriel()
  35.      Toriel.alpha = 0
  36. end
  37.  
  38. function RevealToriel()
  39.      Toriel.alpha = 1
  40. end
  41.  
  42. function Sacrifice()
  43.     local revive = GetGlobal ("revive")
  44.     if revive == 1 and frame2 == 1 then
  45.         CyanSoul.MoveTo(314, 400)
  46.         frame2 = 2
  47.     elseif revive == 1 and frame2 <= 360 then
  48.         CyanSoul.y = CyanSoul.y - 0.3
  49.         frame2 = frame2 + 1
  50.         CyanSoul.alpha = CyanSoul.alpha - 0.01
  51.     end
  52. end
  53.  
  54. function AnimateToriel()
  55.     local TrueBattle = GetGlobal ("TrueBattle")
  56.     if TrueBattle == 2 then
  57.  
  58.     end
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement