|
-
May 6th, 2000, 10:16 PM
#1
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
-
May 8th, 2000, 06:17 AM
#2
Frenzied Member
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
Code:
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
-
May 8th, 2000, 06:57 AM
#3
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
-
May 10th, 2000, 08:02 PM
#4
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|