SHARE
TWEET

renpy animations

a guest Mar 19th, 2016 188 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #---------------------
  2. # Character Positions
  3. #---------------------
  4.  
  5. transform left:
  6.     xanchor 0.5
  7.     yanchor 1
  8.     xpos .2
  9.     yoffset 0
  10.    
  11. transform right:
  12.     xanchor 0.5
  13.     yanchor 1
  14.     xpos .75
  15.     yoffset 0
  16.    
  17. transform center:
  18.     zoom 1
  19.     xanchor 0.5
  20.     yanchor 1
  21.     xpos .5
  22.     yoffset 0
  23.    
  24. # Positions for when 4 characters are on screen at once
  25.  
  26. transform left4:
  27.     xanchor 0.5
  28.     yanchor 1
  29.     xpos .18
  30.     yoffset 0
  31.    
  32. transform mleft4:
  33.     xanchor 0.5
  34.     yanchor 1
  35.     xpos .37
  36.     yoffset 0
  37.    
  38. transform mright4:
  39.     xanchor 0.5
  40.     yanchor 1
  41.     xpos .6
  42.     yoffset 0
  43.    
  44. transform right4:
  45.     xanchor 0.5
  46.     yanchor 1
  47.     xpos .8
  48.     yoffset 0
  49.  
  50.  
  51. #For short characters (Serafina, Nico, Annie)
  52. transform center_alone:
  53.     zoom 1.3
  54.     xanchor 0.5
  55.     yalign 1.0
  56.     xpos .5 yoffset 300
  57.  
  58. # For tall-ish characters (Ian, Barbara, Julieta)
  59. transform center_alone2:
  60.     zoom 1.3
  61.     xanchor 0.5
  62.     yalign 1.0
  63.     xpos .5 yoffset 350
  64.  
  65. # For tall characters: Franco
  66. transform center_alone3:
  67.     zoom 1.3
  68.     xanchor 0.5
  69.     yalign 1.0
  70.     xpos .5 yoffset 380
  71.  
  72. transform closeup:
  73.     #Works with Nico, Barbara, Julieta
  74.     parallel:
  75.         linear .3 yoffset -100
  76.     parallel:
  77.         linear .3 zoom 1.6
  78.  
  79. transform closeup_t:
  80.     #Works with Ian
  81.     parallel:
  82.         linear .3 yoffset -50
  83.     parallel:
  84.         linear .3 zoom 1.6
  85.  
  86. # For Serafina and Annie.
  87. transform closeup_s:
  88.    
  89.     parallel:
  90.         linear .3 yoffset -200
  91.     parallel:
  92.         linear .3 zoom 1.6
  93.  
  94. transform closeup_end:
  95.     parallel:
  96.         linear .3 zoom 1
  97.        
  98.     parallel:
  99.         linear .3 yoffset 0
  100.  
  101.  
  102. # Do we want speak... ? (that'd involve messing with the z order again or using Pytom's solution he came up with last year)
  103. # Probably darkening characters not speaking with a filter...
  104. transform speak:
  105.         linear .2 yanchor .9
  106.         linear .2 zoom 1.15
  107.  
  108. transform endspeak:
  109.     parallel:
  110.         linear .2 zoom 1
  111.         linear .2 yanchor .99
  112.     parallel:
  113.         yoffset 0
  114.  
  115.  
  116. #------------
  117. # Animation
  118. #------------
  119.  
  120. # Move from side to side once
  121. transform sway:
  122.     linear 0.3 xoffset 20
  123.     linear 0.3 xoffset -20
  124.     linear 0.3 xoffset 0
  125.  
  126. # Shaking character
  127. transform shaking:
  128.     linear 0.05 xoffset 5
  129.     linear 0.05 xoffset -5
  130.     repeat
  131.  
  132. # Moves fastly to the right and then returns to original position        
  133. transform bounce_right:
  134.     easeout 0.1 xoffset 50
  135.     easein 0.3 xoffset 0
  136.  
  137. # Moves fastly to the left and then returns to original position
  138. transform bounce_left:
  139.     easeout 0.1 xoffset -50
  140.     easein 0.3 xoffset 0
  141.  
  142. # Little excited jump!        
  143. transform bounce_up:
  144.     easeout 0.2 yoffset -70
  145.     easein 0.2 yoffset 0
  146.  
  147. # Taken aback! :P        
  148. transform bounce_down:
  149.     easeout 0.2 yoffset 120
  150.     easein 0.4 yoffset 0
  151.  
  152. #--------------------------
  153.  
  154. #Script
  155. show franco at center with dissolve
  156.     "testing animations"
  157.     show franco at sway
  158.     "sway"
  159.     show franco at shaking
  160.     "shaking"
  161.     show franco at bounce_right
  162.     "bounce right"
  163.     show franco at bounce_left
  164.     "bounce left"
  165.     show franco at bounce_up #not working
  166.     "bounce up"
  167.     show franco at bounce_down
  168.     "bounce down"
  169.     show franco at center_alone3 with dissolve
  170.     "center_alone"
  171.     show franco at center with dissolve
  172.     "..."
  173.     show franco at closeup_t
  174.     show enzo at left with dissolve
  175.     "Close up test."
  176.     show enzo at closeup
  177.     show franco at closeup_end
  178.     "..."
  179.     show franco at right with move
  180.     show enzo at closeup_end
  181.     show franco at closeup_t
  182.     "wooo~"
  183.     show franco at closeup_end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top