Dice Posted August 12, 2013 Share Posted August 12, 2013 when maximize is clicked... setTimer ( function() local x, y = guiGetSize ( win, false ) if y <= 537 then guiSetSize ( win, x, y + 0.04, false ) end end, 50, 0 ) the code literally does nothing. would onClientRender do the trick? Link to comment
tosfera Posted August 12, 2013 Share Posted August 12, 2013 Nope, but why do you want to use this functions? Maybe there is another way. Link to comment
xXMADEXx Posted August 12, 2013 Share Posted August 12, 2013 Try this: function doAnimation ( ) local x, y = guiGetSize ( win, false ) if ( y <= 537 ) then guiSetSize ( win, x, y + 0.04, false ) else removeEventHandler ( "onClientRender", root, doAnimation ) end end addEventHandler ( "onClientRender", root, doAnimation ) Link to comment
bandi94 Posted August 12, 2013 Share Posted August 12, 2013 Ofc the "code literally does nothing" . You are using Y+0.04 with absolute system that mean very very litel. And with that timmer you will need 1.2 secound only to grow it 1px. @xXMADEXx 's code it's better bk it's faster but still +0.04 very low , with 60fps you will need +/- 0.25 s to move it 1 px so you will move it 4px/s Link to comment
Dealman Posted August 12, 2013 Share Posted August 12, 2013 Use this instead; interpolateBetween Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now