Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weather System
#13
What I dont like is how you are using a timer for the raindrop/snow drop.

Use a function like GetTickCount

Code:
Public Declare Function GetTickCount lib "Kernel32" as long()

Code:
Global SnowDropTimer1 as long  'Our Tick based timer
Global Constant SnowDropTimer2 = 100 'Our constant time in MS
Global IsRaining as boolean 'Is it raining?


Put it somewhere
Code:
SnowDropTimer1 = GetTickCount + SnowDropTimer2

Code:
If GetTickCount => SnowDropTimer1 Then
SnowDropTimer1 = GetTickcount + SnowDropTimer2       'You've got to update the information
   Call IIf(IsRaining, IsRaining = False, IsRaining = True) 'If it is raining, then it isnt. If it isnt, then it is. :)
End If

...Use the rest for your imagination Tongue
[/code]
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)