Click to See Complete Forum and Search --> : help
tonyp
Feb 26th, 2000, 01:09 AM
if image2 cordinates is 1200, 2040 how do you make
that image1 don't walk over image2?
Arie
Feb 26th, 2000, 01:38 AM
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. :)
tonyp
Feb 26th, 2000, 01:43 AM
it's a rpg game!
Fox
Feb 26th, 2000, 02:45 AM
Make it tile-based.
KENNNY
Feb 26th, 2000, 03:40 AM
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.
tonyp
Feb 26th, 2000, 04:38 PM
how do i make it tile based
Fox
Feb 26th, 2000, 10:38 PM
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:
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.
Fox
Feb 26th, 2000, 10:39 PM
Wow, now we can indent the code :cool:
KENNNY
Feb 27th, 2000, 02:49 AM
awww baad :)
Function LookICanIndent(At Least I Hope so)
er this isnt working..
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.