Click to See Complete Forum and Search --> : how do i make variables?
hi
im making a kind of simple paratrooper game and i was
wondering how you make variables so the computer flies by
every so often, but not in a pattern. also, any
suggestions on anything that would make this game programming easier would be helpful.
-thanks
-t_dawolf
Sam Finch
May 8th, 2000, 06:17 AM
I don't quite understand you, do you just want a plane to fly by ocasionally.
put a timer on your form, set enabled to false and the interval to 1000, then use somthing like this
Private Sub Timer1_Timer()
If Rnd > Prob Then 'Prob is the probability that the
'plane will fly by in a given second
'ie if Prob = 0.1 then the plane
'will fly by once every 10 seconds on
'average
FlyPlane 'FlyPlane is your sub that starts the
'plane
End If
End Sub
thanks
acutally, i don't want it to fly by at the exact same time
every time, i want it to be random. so i'll try the code
and get back to you.
-thanks
-t_dawolf
anyone have any idea>?
i know it can be done.
i just want a simple AI. so any and all code would be appreciated.
also, if you could tell me a site with a tutorial or anyhting, i would be most appreciative.
-thanks
-t_dawolf
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.