counters

wild wolf
10-31-2001, 11:04 AM
have a look at this code,

Private Sub flagtimer_Timer()
While flagcounter < 19
If flag(flagcounter).Top + flag(flagcounter).Height > 850 Then
flagcaption = 20 + flagcounter
flag(flagcounter).Caption = flagcaption
flag(flagcounter).Top = 0
End If
If flagcaption > 20 Then flagcaption = flagcaption + flagcounter
flagcounter = flagcounter + 1
Wend
End Sub

it is for a flag which runs on the UP keypressed and acts as a flag thourghout the game, the value is increased everytime the flag goes down and appears above again, the prob is it will reach 38 and then the value will again be 20, i know where the prob is but i dun know how to fix it images/icons/smile.gif, can u help me? actually this flag is used to position an opponet car on a network as my game i snetwork based.

Mill
11-05-2001, 11:33 AM
Could you explain what it is that you WANT to happen?

wild wolf
11-05-2001, 11:42 AM
iam using this counter as a flag, when one flag goes off screen it appears above and moves down again, in this way the flag value increases accordingly, for example, when fkag number goes off screen, its value becomes 20 (the screen has 19 flags ), and if flag 2 goes off screen it appears up and its value becomes 21 and in this way it goes on until the end of the game, iam using it to get the location (flag number ) of other players on the network

wild wolf
11-06-2001, 12:43 AM
ok i changed my code to as below, but the flagcaption value just does not increase as normal, iam getting frustrated now, i couldnt attach the whole project as its quite big in size


Private Sub flagtimer_Timer()
While flagcounter < 19
If flag(flagcounter).Top + flag(flagcounter).Height > 850 Then
number = 20 * counter
flagcaption = number + flagcounter
flag(flagcounter).Caption = flagcaption
flag(flagcounter).Top = 0
End If
flagcounter = flagcounter + 1
Wend
counter = counter + 1
'flagcounter = 0
End Sub

Teric
11-06-2001, 11:20 AM
Can you zip up your project and attach it? It would be very helpful to be able to see exactly what is going wrong.


BTW--2000th post to this forum!

ChiefRedBull
11-06-2001, 12:46 PM
2000th??? So how come youre still only a regular.......? Your profile says 77th......

Chief

Banjo
11-06-2001, 12:48 PM
His bio says he's got 77 posts?!?

Mill
11-06-2001, 12:51 PM
Not his 2000th post, the Game Forum's 2000th post.
images/icons/smile.gif

Thinker
11-06-2001, 12:53 PM
He's talking about the total post count for the game forum. And this is #2004

Banjo
11-06-2001, 12:54 PM
Ahh, understanding.

ChiefRedBull
11-06-2001, 01:54 PM
After blowing the sawdust outta my easr, i got it. Whoospy.

Chief

wild wolf
11-06-2001, 08:52 PM
i cant attach the file coz its too large, ok i have an idea, ill ask u a a question, i want to create a counter that runs through out the game, there are 20 images on the screen in a line (from top to bottom) and when a up key is pressed these images move down, and when an image gets off screen it appears on the top and moves down again and so on. the counter increases with the movement of the images, When the image goes off screen it becomes 1 then when another image goes off screen it increaments by 1 and so on until the end of the game, this is the scenerio.
ok the question is how do we do it???

wild wolf
11-06-2001, 08:55 PM
by the way this is #2008

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum