Timing
#1
Posted 23 March 2008 - 07:04 PM
alarm[0]=1065 ... How can I make the alarm be exact 1065 miliseconds ... O,o
#2
Posted 23 March 2008 - 07:14 PM
have you changed the room speed?
go on a room. there is a tab called settings.
change that number to... 1000 i think.that means, there are 1000 steps per second. 1000 milliseconds per second.
then your alarm should work properly
(though this is only if there are 1000 milliseconds per second... if its wrong, change the number to how many milliseconds there are per sec... i was never good at maths
if you are not familiar with alarms:
set alarm[0] to 1065
in alarm[0] make the appropriate event happen, AND (if you want it to repeat) make another set alarm[0] to 1065 in alarm[0] event
Hope this helped you
Edited by giggdaw, 23 March 2008 - 07:18 PM.
#3
Posted 23 March 2008 - 07:30 PM
#4
Posted 23 March 2008 - 11:24 PM
#5
Posted 23 March 2008 - 11:25 PM
#6
Posted 23 March 2008 - 11:26 PM
yes but I dont quite catch it ...Did you see what Yourself said?
Edit : In other words how to make a timer that triggers at every exact 1065 milliseconds ?
Edited by freaky_entertainment, 23 March 2008 - 11:27 PM.
#7
Posted 23 March 2008 - 11:29 PM
However, because you're not asking for a ridiculously small delay, you might be able to do something with Yourself's high resolution timer. I wouldn't really know, having never tried it.
Edited by Mnementh, 23 March 2008 - 11:30 PM.
#8
Posted 24 March 2008 - 12:54 AM
#9
Posted 24 March 2008 - 04:25 AM
30/1000*1065
This would make your timer exactly 31.95 steps. So this meens that you would need to round it off to 32 steps if you have a room_speed of 30. Or just put the following into the alarm event:
room_speed/1000*1065
#10
Posted 24 March 2008 - 05:17 AM
I have worked out your answer with a mathematical formula. If your room_speed is 30 then the formula is:
30/1000*1065
This would make your timer exactly 31.95 steps. So this meens that you would need to round it off to 32 steps if you have a room_speed of 30. Or just put the following into the alarm event:
room_speed/1000*1065
That's assuming that each step lasts for 1/30 of a second, which isn't necessarily true.
#11
Posted 24 March 2008 - 07:36 AM
Sounds wierd but I can't seem to find a way to make something repeate exactly at 1065 miliseconds range ... the following doesnt work fine :
alarm[0]=1065 ... How can I make the alarm be exact 1065 miliseconds ... O,o
the 1065 arent miliseconds! they are steps
the defualt number of steps per second is 30. so that means that alarm 0 is equal to 35 seconds!
#12
Posted 24 March 2008 - 10:53 AM
Which is to say:
30 steps = 1 second = 100 milliseconds
3 steps would be = 10 miliseconds.
So if you want 1065, it should be 318.5 steps.
(I'm not sure if you could put the .5 there)
#13
Posted 24 March 2008 - 10:55 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











