09-07-2007, 09:29 PM
Dave Wrote:If you're using a seperate picture file for flags, you'll need to load them into a surface the same way the other graphics are in modDirectX.LOL this is the first answer that i understand the first answer that shows me where to search thanks.
To make it switch, you'll just do something like, "If player.x = flag.x And player.y = flag.y then..."
And to change color, you could just have to flag colors and do flag.color = 2
So you mean something like this.
Code:
' Init flags ddsd type and load the bitmap
DDSD_flag.lFlags = DDSD_CAPS
DDSD_flag.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN Or DDSCAPS_SYSTEMMEMORY
Set DD_flagSurf = DD.CreateSurfaceFromFile(App.Path & "\GFX\fn.bmp", DDSD_Flag)
SetMaskColorFromPixel DD_ItemSurf, 0, 0
fn.bmp contains 3 flag sprites they are all 32x32 so the total size is 32 height and 96 width.
one flag is gray(no team) another flag is red and another one is blue. Another question i got is: must "DDSD_flag.lFlags ,DDSD_flag.ddsCaps.lCaps ,DD_flagSurf" must all words that are red be flag or tile??
player must be class for example class 1 is team 1 class 2 is team 2 for example