1688 posts
Location
'MURICA
Posted 26 August 2012 - 01:49 AM
I'm trying to use a computer to play gangnam style, however I figure that the increments aren't specific enough as the song always plays too slow or too fast.
Gangnam style is at approx. 131 BPM. The time between quarter beats is, determined by calculator, 0.11450381679389312977099236641221.
0.1 produces the exact same result, which is 150 BPM - a huge noticeable difference, which is how I know this.
The song sounds as if it's playing at ~100-110 BPM, and that makes this fact even more ridiculous.
2447 posts
Posted 26 August 2012 - 08:02 AM
Sleep works on minecraft ticks, meaning the smallest increment of time will be 0.05.
1688 posts
Location
'MURICA
Posted 26 August 2012 - 08:26 PM
Is it possible for sleep() to not rely on ticks?
3 posts
Posted 26 August 2012 - 10:11 PM
im pretty sure that sleep does not rely on minecraft ticks, when i was making my password door (first script) i did sleep(5) so the door would stay open for 5 seconds, then close, and it closed after 5 seconds, however, im not sure, as the ticks per second changes depending on your Fps, so please give me your average Fps to figure out how many ticks per second you are getting. at 100Fps it's 16Tps i think.
1243 posts
Location
Indiana, United States
Posted 27 August 2012 - 12:20 AM
Sleep() relies on ticks, but is measured in seconds, so that you enter measurements of seconds, but increments of ticks.
997 posts
Location
Wellington, New Zealand
Posted 27 August 2012 - 05:44 AM
im pretty sure that sleep does not rely on minecraft ticks, when i was making my password door (first script) i did sleep(5) so the door would stay open for 5 seconds, then close, and it closed after 5 seconds, however, im not sure, as the ticks per second changes depending on your Fps, so please give me your average Fps to figure out how many ticks per second you are getting. at 100Fps it's 16Tps i think.
Minecraft always runs at 20 TPS, unless it takes more than 50ms to do a tick.