Results 1 to 4 of 4

Thread: how do i make variables?

  1. #1
    Guest

    Angry

    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

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    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

  3. #3
    Guest
    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

  4. #4
    Guest
    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
  •  



Click Here to Expand Forum to Full Width