Me[Z]oO Posted February 26, 2018 Posted February 26, 2018 hello , i need help to make the colshape's size reduce every two minutes Skype :- mezo.prince1 FaceBook :- https://www.facebook.com/medolua YouTube :- http://www.youtube.com/c/MeZoOPriNse
NeXuS™ Posted February 26, 2018 Posted February 26, 2018 Use a timer, and you'll have to recreate the colshape, as it can't be resized. Did I help you? NeXuS™#0001
Me[Z]oO Posted February 26, 2018 Author Posted February 26, 2018 local radius = 520 local MySphere = createColSphere(0, 0, 3, radius) function changeSize( size ) radius = size if ( radius > 10 ) then setTimer ( changeSize, 1000, 0, radius-1 ) end end setTimer ( changeSize, 1000, 0, radius-1 ) not work ! Skype :- mezo.prince1 FaceBook :- https://www.facebook.com/medolua YouTube :- http://www.youtube.com/c/MeZoOPriNse
NeXuS™ Posted February 26, 2018 Posted February 26, 2018 (edited) Because the element is already created. You'll have destroy and then create it in your function called by the timer. Edited February 26, 2018 by NeXuS™ Did I help you? NeXuS™#0001
Me[Z]oO Posted February 26, 2018 Author Posted February 26, 2018 Just now, NeXuS™ said: Because the element is already created. You'll have destroy and then create it in your function called by the timer. by this way it maybe bring lag can u edit my code to your way because I didn't understand you Skype :- mezo.prince1 FaceBook :- https://www.facebook.com/medolua YouTube :- http://www.youtube.com/c/MeZoOPriNse
NeXuS™ Posted February 26, 2018 Posted February 26, 2018 (edited) local radius = 520 local MySphere = createColSphere(0, 0, 3, radius) function changeSize() radius = radius - 10 destroyElement(MySphere) MySphere = createColSphere(0, 0, 3, radius) end setTimer(changeSize, 1000, 0) Edited February 26, 2018 by NeXuS™ 1 Did I help you? NeXuS™#0001
Me[Z]oO Posted February 26, 2018 Author Posted February 26, 2018 does that method bring lag ? 1 Skype :- mezo.prince1 FaceBook :- https://www.facebook.com/medolua YouTube :- http://www.youtube.com/c/MeZoOPriNse
Moderators IIYAMA Posted February 27, 2018 Moderators Posted February 27, 2018 If you do this every second, yes. (little network lagg, which will be visible by players with slow internet) But every 2 minutes will be fine. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Me[Z]oO Posted February 28, 2018 Author Posted February 28, 2018 19 hours ago, IIYAMA said: If you do this every second, yes. (little network lagg, which will be visible by players with slow internet) But every 2 minutes will be fine. And what about 10 seconds Does a lag come? Skype :- mezo.prince1 FaceBook :- https://www.facebook.com/medolua YouTube :- http://www.youtube.com/c/MeZoOPriNse
Moderators IIYAMA Posted February 28, 2018 Moderators Posted February 28, 2018 Shouldn't be notice able. (unless really really really :~ty internet) 2 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Me[Z]oO Posted March 1, 2018 Author Posted March 1, 2018 Ok Ty Skype :- mezo.prince1 FaceBook :- https://www.facebook.com/medolua YouTube :- http://www.youtube.com/c/MeZoOPriNse
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