Advertisement
OmegaGamingHunters

Toriel Intro (CYF) (Animation)

Jan 22nd, 2018
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.08 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. --Now we adjust the height for the individual parts so they look more like a skeleton and less like a pile of bones.
  6. CyanSoul.y = 314
  7. CyanSoul.x = 510
  8. CyanSoul.xscale = 1.0
  9. CyanSoul.yscale = 1.0
  10.  
  11. --Finally, we do some frame-by-frame animation just to show off the feature. You put in a list of sprites,
  12. --and the time you want a sprite change to take. In this case, it's 1 of a second.
  13. timer = 0
  14. SetGlobal("help",0)
  15. function TorielIntro()
  16.     local help = GetGlobal ("help")
  17.     if help == 1 then
  18.         CyanSoul = CreateSprite("a_cyanSoul")
  19.         CyanSoul.MoveTo(314, 400)
  20.         SetGlobal("help",2)
  21.     elseif help == 2 then
  22.         CyanSoul.alpha = 0.00
  23.     end    
  24. end
  25.  
  26. function HideToriel()
  27.      Toriel.alpha = 0
  28. end
  29.  
  30. function RevealToriel()
  31.      Toriel.alpha = 1
  32. end
  33.  
  34. function Sacrifice()
  35.     CyanSoul.MoveTo(314, 300)
  36.     CyanSoul.alpha = 0
  37.     Audio.PlaySound(nom)
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement