Jump to content

GUI Animations


Recommended Posts

You can do that without interpolate functions. Basic mathematical knowledge required. ; D

  
local h, stopAnimAt = 0.5, 0 -- let's say we want maximum height 0.5 and stop animation at 0 
local move, win = 0, guiCreateWindow (0.4, 0.4,0.7,h, "test window", true) -- relative sizes 
  
addEventHandler("onClientRender",root, 
function ( ) 
if h <= stopAnimAt then 
--[[ 
h = stopAnimAt  
local wid, _ = guiGetSize ( win , true ) 
guiSetSize ( win, wid, h, true )]] -- if window does not fully scroll up then remove brackets and use this 
  
else 
 h = h -  0.01 -- subtracting will scroll the window up 
local wid, _ = guiGetSize ( win , true ) 
guiSetSize ( win, wid, h, true ) 
end 
  
 end ) 

Edited by Guest
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...