Results 1 to 9 of 9

Thread: help

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Posts
    20

    Post

    if image2 cordinates is 1200, 2040 how do you make
    that image1 don't walk over image2?

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636

    Post

    Hi!

    You can write the next conditions:

    if image1.left > image2.left and _
    image1.top > image2.top and _
    image1.top+image1.height < image2.top+image2.height
    ...
    end if

    or something like it.
    I don't remember exactly.

    p.s.

    Tell me what style of game you want to do.

    Thank you,
    Arie.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Posts
    20

    Post

    it's a rpg game!

  4. #4
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Post

    Make it tile-based.

  5. #5
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355

    Post

    indeed
    and write a RECT intersecting function, which can be used for lots of stuff.

    ie.

    Function InRect(r1 as RECT, r2 as RECT) as boolean

    email me if u want code.

    buzzwords are the language of fools

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Posts
    20

    Post

    how do i make it tile based

  7. #7
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Post

    First you must have an array of tiles where you store the DCs of your pictures. Next is a map where you store the indexes of the tiles.
    Like this:
    Code:
    Dim A as Long,B as Long
    Dim Tile() as Long
    Dim Map() as Long
    
    'Load some tiles
    ReDim Tile(2)
    Tile(0) = Picture1.hDC
    Tile(1) = Picture2.hDC
    
    'Randomize map
    ReDim Map(10,20)
    For A = 0 to 10
       For B = 0 to 20
          Map(A,B)= 1 * Rnd
       Next
    Next
    Hope this helps.

  8. #8
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Post

    Wow, now we can indent the code

  9. #9
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355

    Post

    awww baad

    Code:
    Function LookICanIndent(At Least I Hope so)
    
       er this isnt working..



    buzzwords are the language of fools

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