OnlineCheater Posted February 15, 2016 Share Posted February 15, 2016 (edited) Hey everyone, I just wanted to have a short example of animation with a picture. Use dxDrawImage & InterpolateBetween please. Thanks in advance! Here is my code: local g_Interface = nil sX,sY = guiGetScreenSize() function animatedPicture() if g_Interface then return end g_Interface = {} g_Interface.imgWidth, g_Interface.imgHeight = 200, 200 g_Interface.startTime = getTickCount() g_Interface.startSide = {0, 0} g_Interface.endSide = {g_Interface.imgWidth, g_Interface.imgHeight} g_Interface.endTime = g_Interface.startTime + 1000 local now = getTickCount() local elapsedTime = now - g_Interface.startTime local duration = g_Interface.endTime - g_Interface.startTime local progress = elapsedTime / duration local width, height, _ = interpolateBetween (g_Interface.endSide[1], g_Interface.endSide[2],0, g_Intefaace.endSide[1], g_Interface.endSide[2], 0, progress, "OutElastic") dxDrawImage(sX/2-60,16,width,height,"img/image.png") end Edited February 15, 2016 by Guest Link to comment
tosfera Posted February 15, 2016 Share Posted February 15, 2016 NOTE: Please remember that this is not a forum for requests. We can help you with your code or question but we will not script for you. source; https://forum.multitheftauto.com/viewtopic.php?f=91&t=47897 Link to comment
OnlineCheater Posted February 15, 2016 Author Share Posted February 15, 2016 NOTE: Please remember that this is not a forum for requests. We can help you with your code or question but we will not script for you. source; https://forum.multitheftauto.com/viewtopic.php?f=91&t=47897 I was editing my post just after I posted it for you to check what I've already done and then I've seen your quote which was added so quickly.. Anyway, it seems like you're online to get more and more posts only... I've added my script code very quickly and you rushed faster. WHY? I guess it's for you to get +1 post to your account database of this forum... Great! Give more lessons! Just wanna tell you that my code doesn't work, that's why I didn't posted firstly what I had done. Link to comment
OnlineCheater Posted February 15, 2016 Author Share Posted February 15, 2016 Alright, thanks for help everyone I've successfully done this easy thing.. Problem Solved! 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