AJXB Posted April 7, 2014 Posted April 7, 2014 local px, py = guiGetPosition ( pic,false ) local sx,sy = guiGetScreenSize () function onRender( ) if state == 'OpenIt' then local nx, ny = interpolateBetween ( px, py,0,px,(py/3)+85,0,getProgress( 3000 ),"OutElastic",0.3, 1.0 ) guiSetPosition( pic, nx, ny, false ) elseif state == 'CloseIt' then local nx, ny = interpolateBetween ( px, py,0,px,(py/3)+475,0,getProgress( 3000 ),"OutElastic",0.3, 1.0 ) guiSetPosition( pic, nx, ny, false ) end end addEventHandler( 'onClientRender', root, onRender ); So I've managed to kinda make it move in the way I want, but when I trigger a function that will open the picture and trigger another to close it, it does not animate like it used to, I mean first time I start the resource and trigger openIt, OutElastic works, then I close it, Now the second time I open it, It doesn't animate, what's the issue ? ~ This has to be the worst board post I have ever read. It simply makes no sense. You start off by talking about space or something, then you randomly start babbling about cupcakes, and you end off with random fish names. ~ Don't listen to this guy, any board with the categories 'dinosaurs, spaceships, fried foods, wild animals, alien abductions, business casual, robots, and fireworks' has true potential.
AJXB Posted April 7, 2014 Author Posted April 7, 2014 It is, outside of this code, I put "state = 'CloseIt'" ~ This has to be the worst board post I have ever read. It simply makes no sense. You start off by talking about space or something, then you randomly start babbling about cupcakes, and you end off with random fish names. ~ Don't listen to this guy, any board with the categories 'dinosaurs, spaceships, fried foods, wild animals, alien abductions, business casual, robots, and fireworks' has true potential.
50p Posted April 7, 2014 Posted April 7, 2014 What do you mean it doesn't animate? Does it still "open" or not? To me it looks like messed up coords. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
AJXB Posted April 7, 2014 Author Posted April 7, 2014 Well, to explain, there are 2 steps, Open, and close, When I open it, all good, close works too, but the animate, the interpolatebetween and the OutElastic aren't working, When I open it for the second time, It only sets the position, Like interpolateBetween doesn't exist. ~ This has to be the worst board post I have ever read. It simply makes no sense. You start off by talking about space or something, then you randomly start babbling about cupcakes, and you end off with random fish names. ~ Don't listen to this guy, any board with the categories 'dinosaurs, spaceships, fried foods, wild animals, alien abductions, business casual, robots, and fireworks' has true potential.
50p Posted April 7, 2014 Posted April 7, 2014 Then getProgress returns 1.0. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
AJXB Posted April 7, 2014 Author Posted April 7, 2014 What can I do to change that? I mean what could cause it ? ~ This has to be the worst board post I have ever read. It simply makes no sense. You start off by talking about space or something, then you randomly start babbling about cupcakes, and you end off with random fish names. ~ Don't listen to this guy, any board with the categories 'dinosaurs, spaceships, fried foods, wild animals, alien abductions, business casual, robots, and fireworks' has true potential.
AJXB Posted April 7, 2014 Author Posted April 7, 2014 Anyone please? ~ This has to be the worst board post I have ever read. It simply makes no sense. You start off by talking about space or something, then you randomly start babbling about cupcakes, and you end off with random fish names. ~ Don't listen to this guy, any board with the categories 'dinosaurs, spaceships, fried foods, wild animals, alien abductions, business casual, robots, and fireworks' has true potential.
50p Posted April 7, 2014 Posted April 7, 2014 What's getProgress function? - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
AJXB Posted April 8, 2014 Author Posted April 8, 2014 I solved it by adding lastTick = getTickCount( ); everytime the value changes, as FabioGNR advised Thank you ~ This has to be the worst board post I have ever read. It simply makes no sense. You start off by talking about space or something, then you randomly start babbling about cupcakes, and you end off with random fish names. ~ Don't listen to this guy, any board with the categories 'dinosaurs, spaceships, fried foods, wild animals, alien abductions, business casual, robots, and fireworks' has true potential.
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