I was looking for a way to set a timer to "tick" every 250 milliseconds but only found resources talking about speedwalking and the 1 second lower limit on current timers.
I looked into the speedwalking but what I need is a little bit different than that. Here is my setup I'm hoping to achieve:
Call a script every 250ms which will increment a counter called "Tick". I will then use "Tick" to establish how long it has been since I attempted to do a specific action, and thus if it is time to reset and resend the action or not.
Example:
Command- Drink Health (drinkbal = 0;healthtimer = tick) --This sets it so I remember at which tick I sent the command "drink health"
Trigger- You drink some health (healthtimer = 0)
When the "Timer" function is called by the timer, it will increment "Tick" and then make this check:
if (healthtimer ~= 0 and tick >= healthtimer + 3) then (healthtimer = 0;drinkbal = 1) end
That code should make it so after 3 ticks (750ms) I will resend the command "Drink Health".
I looked into the speedwalking but what I need is a little bit different than that. Here is my setup I'm hoping to achieve:
Call a script every 250ms which will increment a counter called "Tick". I will then use "Tick" to establish how long it has been since I attempted to do a specific action, and thus if it is time to reset and resend the action or not.
Example:
Command- Drink Health (drinkbal = 0;healthtimer = tick) --This sets it so I remember at which tick I sent the command "drink health"
Trigger- You drink some health (healthtimer = 0)
When the "Timer" function is called by the timer, it will increment "Tick" and then make this check:
if (healthtimer ~= 0 and tick >= healthtimer + 3) then (healthtimer = 0;drinkbal = 1) end
That code should make it so after 3 ticks (750ms) I will resend the command "Drink Health".