LiOneLMeSsIShoT Posted January 20, 2014 Share Posted January 20, 2014 Well in this : local seconds = getTickCount() / 800, 1000 local angle = math.sin(seconds) * 360 the image don't move in 360 direction. like it just move 360 and then comes back and then move 360...stop so i need it to not move back and goes 360 everytime without stoping someone help me to make it move in 360 with a full circle Link to comment
Castillo Posted January 20, 2014 Share Posted January 20, 2014 local sx, sy = guiGetScreenSize ( ) local lastUpdate = 0 local angle = 0 function renderDisplay ( ) if ( getTickCount ( ) - lastUpdate >= 1000 ) then angle = ( angle + 1 ) if ( angle > 359 ) then angle = 0 end end dxDrawImage ( sx / 2 - 50, 0, 100, 240, "myimage.png", angle, 0, -120 ) end addEventHandler ( "onClientRender", getRootElement(), renderDisplay ) 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