Me[Z]oO Posted February 26, 2018 Share Posted February 26, 2018 hello , i need help to make the colshape's size reduce every two minutes Link to comment
NeXuS™ Posted February 26, 2018 Share Posted February 26, 2018 Use a timer, and you'll have to recreate the colshape, as it can't be resized. Link to comment
Me[Z]oO Posted February 26, 2018 Author Share 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 ! Link to comment
NeXuS™ Posted February 26, 2018 Share 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™ Link to comment
Me[Z]oO Posted February 26, 2018 Author Share 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 Link to comment
NeXuS™ Posted February 26, 2018 Share 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 Link to comment
Me[Z]oO Posted February 26, 2018 Author Share Posted February 26, 2018 does that method bring lag ? 1 Link to comment
Moderators IIYAMA Posted February 27, 2018 Moderators Share 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. Link to comment
Me[Z]oO Posted February 28, 2018 Author Share 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? Link to comment
Moderators IIYAMA Posted February 28, 2018 Moderators Share Posted February 28, 2018 Shouldn't be notice able. (unless really really really :~ty internet) 2 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