iiv03 Posted November 2, 2019 Share Posted November 2, 2019 (edited) ألسلام عليكم ورحمة الله وبركاته عندي مشكله هنا حاولت اخلي النص لما يخلص الوقت بعدين يرجع النص للبدايه وكذا يبقى لانهائي مبتدئ في برمجه لخبصت شوي وقد محاولت ماتزبط محاولتي local tick = getTickCount() addEventHandler("onClientRender", root, function() local progress = math.min((getTickCount()-tick)/2000,tick) test.moveX = interpolateBetween(test.moveX, test.moveY, 0, 1, 0, 0, progress, "Linear") dxDrawText("FOR TESTING A SOMETHING ALPHA 1.0",sX*0.35-test.moveX,sY*0.15,250,250,tocolor(255,255,255,255), 2.00, "default-build", "left", "center", false) end ) Edited November 2, 2019 by xFabel Link to comment
iiv03 Posted November 5, 2019 Author Share Posted November 5, 2019 شسالفه مشكله ماحد يقدر يحله صعبه؟ Link to comment
فاّرس Posted November 6, 2019 Share Posted November 6, 2019 On 27/09/2019 at 19:50, #\_oskar_/# said: Linear بدل ال بـ CosineCurve Link to comment
iiv03 Posted November 7, 2019 Author Share Posted November 7, 2019 On 06/11/2019 at 17:25, Sha67 said: Linear بدل ال بـ CosineCurve ي حبيبي آدري هاذي تغير وضعيه حركه لما تنفتح تسوي اشكال انا ابغاه أذا خلص الرقممء حق getTickCount يرجع يعيد من بدايه Link to comment
فاّرس Posted November 8, 2019 Share Posted November 8, 2019 ماتوقف عند 1 يعني ترجع من جديد CosineCurve & CosineCurve هي نفسها تقريباً لأن getTickCount عموماً, إذا تبغى نفس طريقتك استخدم متغير بدون local tick = 0 addEventHandler("onClientRender", root, function() tick = tick + 0.01 local T = math.min( tick, 1 ); if T == 1 then tick = 0 end test.moveX = interpolateBetween(test.moveX, test.moveY, 0, 1, 0, 0, T, "Linear") dxDrawText("FOR TESTING A SOMETHING ALPHA 1.0",sX*0.35-test.moveX,sY*0.15,250,250,tocolor(255,255,255,255), 2.00, "default-build", "left", "center", false) end ) 1 Link to comment
Rockyz Posted November 8, 2019 Share Posted November 8, 2019 (edited) On 05/11/2019 at 14:42, xFabel said: شسالفه مشكله ماحد يقدر يحله صعبه؟ حاول تعدل اسلوبك اذا تبي احد يساعدك المهم, سويت لك الكود على حسب الي فهمته منك ما جربته local tick = getTickCount() local from, to = test.moveX, 1; addEventHandler("onClientRender", root, function() local currentTick = getTickCount() local progress = (currentTick - tick) / 2000 local position = interpolateBetween(from, 0, 0, to, 0, 0, progress, "Linear") dxDrawText("FOR TESTING A SOMETHING ALPHA 1.0", sX*0.35-position, sY*0.15, 250, 250, tocolor(255, 255, 255, 255), 2.00, "default-build", "left", "center", false) if progress >= 1 then tick = currentTick from, to = to, from end end) Edited November 8, 2019 by xiRocKyz Link to comment
iiv03 Posted November 8, 2019 Author Share Posted November 8, 2019 20 hours ago, Sha67 said: ماتوقف عند 1 يعني ترجع من جديد CosineCurve & CosineCurve هي نفسها تقريباً لأن getTickCount عموماً, إذا تبغى نفس طريقتك استخدم متغير بدون local tick = 0 addEventHandler("onClientRender", root, function() tick = tick + 0.01 local T = math.min( tick, 1 ); if T == 1 then tick = 0 end test.moveX = interpolateBetween(test.moveX, test.moveY, 0, 1, 0, 0, T, "Linear") dxDrawText("FOR TESTING A SOMETHING ALPHA 1.0",sX*0.35-test.moveX,sY*0.15,250,250,tocolor(255,255,255,255), 2.00, "default-build", "left", "center", false) end ) مو كذا قصدي ذا لما يبدا الحركه توصل وتوقف هناك. 3 hours ago, xiRocKyz said: حاول تعدل اسلوبك اذا تبي احد يساعدك المهم, سويت لك الكود على حسب الي فهمته منك ما جربته local tick = getTickCount() local from, to = test.moveX, 1; addEventHandler("onClientRender", root, function() local currentTick = getTickCount() local progress = (currentTick - tick) / 2000 local position = interpolateBetween(from, 0, 0, to, 0, 0, progress, "Linear") dxDrawText("FOR TESTING A SOMETHING ALPHA 1.0", sX*0.35-position, sY*0.15, 250, 250, tocolor(255, 255, 255, 255), 2.00, "default-build", "left", "center", false) if progress >= 1 then tick = currentTick from, to = to, from end end) مشكور والله هذا الي كان أقصده ممكن سؤال؟ وش سويت غلط عشان اسلوبي مو كويس 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