View Single Post
  #50  
Old 04-27-2011, 04:53 PM
ZaltysZ's Avatar
ZaltysZ ZaltysZ is offline
Approved Member
 
Join Date: Sep 2008
Location: Lithuania
Posts: 426
Default

Quote:
Originally Posted by Ataros View Post
And if I want to delay the first execution by 71999 ticks it should be like follows?
Code:
if (Time.tickCounter() % 72000 == 71999)
Yes. The general formula is:

Code:
if (Time.tickCounter() % A == B)
where:

A = 30 * amount second of seconds you want to repeat something
B = 30 * amount second you want to offset (delay) from beginning of mission

I suppose you want to delay something by 72000 and not by 71999 (although the difference is only 1/30s). So:

Code:
if (Time.tickCounter() % 72000 == 0 &&  Time.tickCounter()-72000==0)
Reply With Quote