Mr.LLoyd Posted April 13, 2012 Share Posted April 13, 2012 Now i dont get error but there is no minimap Link to comment Share on other sites More sharing options...
Zopto Posted April 13, 2012 Share Posted April 13, 2012 are you create on,off buttons like he say in tutorial?? Link to comment Share on other sites More sharing options...
Mr.LLoyd Posted April 13, 2012 Share Posted April 13, 2012 yes>! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/721f8f0f9dbdfa4461e4c11b28c7e392.png) Link to comment Share on other sites More sharing options...
Zopto Posted April 13, 2012 Share Posted April 13, 2012 chage sub```Sub BltMiniMap()Dim i As LongDim X As Integer, Y As IntegerDim Direction As ByteDim CameraX As Long, CameraY As LongDim BlockRect As RECT, WarpRect As RECT, ItemRect As RECT, ShopRect As RECT, NpcOtherRect As RECT, PlayerRect As RECT, PlayerPkRect As RECT, NpcAttackerRect As RECT, NpcShopRect As RECT, NadaRect As RECTDim MapX As Long, MapY As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler MapX = Map.MaxX MapY = Map.MaxY ' ************ ' *** Nada *** ' ************ With NadaRect .top = 4 .Bottom = .top + 4 .Left = 0 .Right = .Left + 4 End With ' Defini-lo no minimap For X = 0 To MapX For Y = 0 To MapY CameraX = Camera.Left + 650 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Engine_BltFast CameraX, CameraY, DDS_MiniMap, NadaRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY Next Y Next X ' ***************** ' *** Atributos *** ' ***************** ' Bloqueio With BlockRect .top = 4 .Bottom = .top + 4 .Left = 4 .Right = .Left + 4 End With ' Warp With WarpRect .top = 4 .Bottom = .top + 4 .Left = 8 .Right = .Left + 4 End With ' Item With ItemRect .top = 4 .Bottom = .top + 4 .Left = 12 .Right = .Left + 4 End With ' Shop With ShopRect .top = 4 .Bottom = .top + 4 .Left = 16 .Right = .Left + 4 End With ' Defini-los no minimap For X = 0 To MapX For Y = 0 To MapY Select Case Map.Tile(X, Y).Type Case TILE_TYPE_BLOCKED CameraX = Camera.Left + 650 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Engine_BltFast CameraX, CameraY, DDS_MiniMap, BlockRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY Case TILE_TYPE_WARP CameraX = Camera.Left + 650 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Engine_BltFast CameraX, CameraY, DDS_MiniMap, WarpRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY Case TILE_TYPE_ITEM CameraX = Camera.Left + 650 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Engine_BltFast CameraX, CameraY, DDS_MiniMap, ItemRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY Case TILE_TYPE_SHOP CameraX = Camera.Left + 650 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Engine_BltFast CameraX, CameraY, DDS_MiniMap, ShopRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY End Select Next Y Next X ' ************** ' *** Player *** ' ************** ' Normal With PlayerRect .top = 0 .Bottom = .top + 4 .Left = 4 .Right = .Left + 4 End With ' Pk With PlayerPkRect .top = 0 .Bottom = .top + 4 .Left = 8 .Right = .Left + 4 End With ' Defini-los no minimap For i = 1 To Player_HighIndex If IsPlaying(i) Then Select Case Player(i).PK Case 0 X = Player(i).X Y = Player(i).Y CameraX = Camera.Left + 650 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Call DDS_BackBuffer.BltFast(CameraX, CameraY, DDS_MiniMap, PlayerRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) Case 1 X = Player(i).X Y = Player(i).Y CameraX = Camera.Left + 650 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Call DDS_BackBuffer.BltFast(CameraX, CameraY, DDS_MiniMap, PlayerPkRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) End Select End If Next i ' *********** ' *** NPC *** ' *********** ' Atacar ao ser atacado e quando for atacado With NpcAttackerRect .top = 0 .Bottom = .top + 4 .Left = 12 .Right = .Left + 4 End With ' Vendendor With NpcShopRect .top = 0 .Bottom = .top + 4 .Left = 16 .Right = .Left + 4 End With ' Outros With NpcOtherRect .top = 0 .Bottom = .top + 4 .Left = 20 .Right = .Left + 4 End With ' Defini-lo no minimap For i = 1 To Npc_HighIndex If MapNpc(i).num > 0 Then Select Case NPC(i).Behaviour Case NPC_BEHAVIOUR_ATTACKONSIGHT Or NPC_BEHAVIOUR_ATTACKWHENATTACKED X = MapNpc(i).X Y = MapNpc(i).Y CameraX = Camera.Left + 650 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Call DDS_BackBuffer.BltFast(CameraX, CameraY, DDS_MiniMap, NpcAttackerRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) Case NPC_BEHAVIOUR_SHOPKEEPER X = MapNpc(i).X Y = MapNpc(i).Y CameraX = Camera.Left + 650 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Call DDS_BackBuffer.BltFast(CameraX, CameraY, DDS_MiniMap, NpcShopRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) Case Else X = MapNpc(i).X Y = MapNpc(i).Y CameraX = Camera.Left + 650 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Call DDS_BackBuffer.BltFast(CameraX, CameraY, DDS_MiniMap, NpcOtherRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) End Select End If Next i ' Error handler Exit Suberrorhandler: HandleError "BltMiniMap", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub```in this:```Sub BltMiniMap()Dim i As LongDim X As Integer, Y As IntegerDim Direction As ByteDim CameraX As Long, CameraY As LongDim BlockRect As RECT, WarpRect As RECT, ItemRect As RECT, ShopRect As RECT, NpcOtherRect As RECT, PlayerRect As RECT, PlayerPkRect As RECT, NpcAttackerRect As RECT, NpcShopRect As RECT, NadaRect As RECTDim MapX As Long, MapY As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler MapX = Map.MaxX MapY = Map.MaxY ' ************ ' *** Nada *** ' ************ With NadaRect .top = 4 .Bottom = .top + 4 .Left = 0 .Right = .Left + 4 End With ' Defini-lo no minimap For X = 0 To MapX For Y = 0 To MapY CameraX = Camera.Left + 25 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Engine_BltFast CameraX, CameraY, DDS_MiniMap, NadaRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY Next Y Next X ' ***************** ' *** Atributos *** ' ***************** ' Bloqueio With BlockRect .top = 4 .Bottom = .top + 4 .Left = 4 .Right = .Left + 4 End With ' Warp With WarpRect .top = 4 .Bottom = .top + 4 .Left = 8 .Right = .Left + 4 End With ' Item With ItemRect .top = 4 .Bottom = .top + 4 .Left = 12 .Right = .Left + 4 End With ' Shop With ShopRect .top = 4 .Bottom = .top + 4 .Left = 16 .Right = .Left + 4 End With ' Defini-los no minimap For X = 0 To MapX For Y = 0 To MapY Select Case Map.Tile(X, Y).Type Case TILE_TYPE_BLOCKED CameraX = Camera.Left + 25 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Engine_BltFast CameraX, CameraY, DDS_MiniMap, BlockRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY Case TILE_TYPE_WARP CameraX = Camera.Left + 25 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Engine_BltFast CameraX, CameraY, DDS_MiniMap, WarpRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY Case TILE_TYPE_ITEM CameraX = Camera.Left + 25 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Engine_BltFast CameraX, CameraY, DDS_MiniMap, ItemRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY Case TILE_TYPE_SHOP CameraX = Camera.Left +25+ (X * 4) CameraY = Camera.top + 25 + (Y * 4) Engine_BltFast CameraX, CameraY, DDS_MiniMap, ShopRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY End Select Next Y Next X ' ************** ' *** Player *** ' ************** ' Normal With PlayerRect .top = 0 .Bottom = .top + 4 .Left = 4 .Right = .Left + 4 End With ' Pk With PlayerPkRect .top = 0 .Bottom = .top + 4 .Left = 8 .Right = .Left + 4 End With ' Defini-los no minimap For i = 1 To Player_HighIndex If IsPlaying(i) Then Select Case Player(i).PK Case 0 X = Player(i).X Y = Player(i).Y CameraX = Camera.Left + 25 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Call DDS_BackBuffer.BltFast(CameraX, CameraY, DDS_MiniMap, PlayerRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) Case 1 X = Player(i).X Y = Player(i).Y CameraX = Camera.Left + 25 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Call DDS_BackBuffer.BltFast(CameraX, CameraY, DDS_MiniMap, PlayerPkRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) End Select End If Next i ' *********** ' *** NPC *** ' *********** ' Atacar ao ser atacado e quando for atacado With NpcAttackerRect .top = 0 .Bottom = .top + 4 .Left = 12 .Right = .Left + 4 End With ' Vendendor With NpcShopRect .top = 0 .Bottom = .top + 4 .Left = 16 .Right = .Left + 4 End With ' Outros With NpcOtherRect .top = 0 .Bottom = .top + 4 .Left = 20 .Right = .Left + 4 End With ' Defini-lo no minimap For i = 1 To Npc_HighIndex If MapNpc(i).num > 0 Then Select Case NPC(i).Behaviour Case NPC_BEHAVIOUR_ATTACKONSIGHT Or NPC_BEHAVIOUR_ATTACKWHENATTACKED X = MapNpc(i).X Y = MapNpc(i).Y CameraX = Camera.Left + 25 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Call DDS_BackBuffer.BltFast(CameraX, CameraY, DDS_MiniMap, NpcAttackerRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) Case NPC_BEHAVIOUR_SHOPKEEPER X = MapNpc(i).X Y = MapNpc(i).Y CameraX = Camera.Left + 25+ (X * 4) CameraY = Camera.top + 25 + (Y * 4) Call DDS_BackBuffer.BltFast(CameraX, CameraY, DDS_MiniMap, NpcShopRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) Case Else X = MapNpc(i).X Y = MapNpc(i).Y CameraX = Camera.Left + 25 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Call DDS_BackBuffer.BltFast(CameraX, CameraY, DDS_MiniMap, NpcOtherRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) End Select End If Next i ' Error handler Exit Suberrorhandler: HandleError "BltMiniMap", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub``` Link to comment Share on other sites More sharing options...
Mr.LLoyd Posted April 13, 2012 Share Posted April 13, 2012 Thank you now it works :] just one question how can i make the minimap to be in the corner cause now is little of the corner>! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/8e5390a6acaafbb853ff7a8fd2458fad.png) Link to comment Share on other sites More sharing options...
Zopto Posted April 13, 2012 Share Posted April 13, 2012 in Sub BltMiniMap() chage cordinats CameraY and CameraX to evrywhere you see number 25 so idk you mast do it alone try put cameraX 22 and CameraX 22 Link to comment Share on other sites More sharing options...
waseemk Posted April 15, 2012 Share Posted April 15, 2012 why do i get this:[![](http://www.freemmorpgmaker.com/files/imagehost/pics/9dd2ec461c07c20cb09eccd11479e658.bmp)](http://www.freemmorpgmaker.com/files/imagehost/#9dd2ec461c07c20cb09eccd11479e658.bmp)Did I do something wrong, or is it just because my map is big. Is there a way to make it show a smaller area so this doesnt happen. Link to comment Share on other sites More sharing options...
Zopto Posted April 15, 2012 Share Posted April 15, 2012 @Zopto:> it is grate but when is map biger and minimap is biger :Salso i hawe question for that how to make to minimap stay litl in corner and to dont get biger Link to comment Share on other sites More sharing options...
Justn Posted April 15, 2012 Share Posted April 15, 2012 I don't think u can zopto.. but I do atleast recommend using the blank tile attribute from the other mini map tutorial I think it makes the mini map look 20x better on larger maps so its not just a big ugly white square Link to comment Share on other sites More sharing options...
Zopto Posted April 15, 2012 Share Posted April 15, 2012 i try that tutorial but i think i do somting wrong i cant make it work xD Link to comment Share on other sites More sharing options...
Justn Posted April 15, 2012 Share Posted April 15, 2012 Hmm I got it too work very easily when I tested it pretty sure if u got this to work u can get that to work they are the same thing basically maybe just try to.add the tile type to this one if its easier for u :) Link to comment Share on other sites More sharing options...
waseemk Posted April 16, 2012 Share Posted April 16, 2012 So I can't fix my problem? Link to comment Share on other sites More sharing options...
Justn Posted April 16, 2012 Share Posted April 16, 2012 @waseemk:> So I can't fix my problem?Looks like it map is too big? How big is it? Link to comment Share on other sites More sharing options...
waseemk Posted April 16, 2012 Share Posted April 16, 2012 100 by 100 is there any way just to make it show a smaller portion of my screen? Link to comment Share on other sites More sharing options...
Zopto Posted April 16, 2012 Share Posted April 16, 2012 make map 30 x30 Link to comment Share on other sites More sharing options...
zenmen Posted April 20, 2012 Share Posted April 20, 2012 working great! thanks! :) Link to comment Share on other sites More sharing options...
zerosavior115 Posted May 14, 2012 Share Posted May 14, 2012 Great tut!but how can i change the possition of the minimap so that instead of it being in the top right corner its instead in the top left corner?? Link to comment Share on other sites More sharing options...
kira423 Posted May 16, 2012 Share Posted May 16, 2012 First off this is a great tutorial and I love having it as an addition in my game, but I am having 1 small problem. As you can see from the attached picture not all 'enemy' npcs show up as the orange color that they should, there are 20 NPC's on this map and only 1 is showing as its correct color, I am not sure as to why it is like that, but how can I fix it? Link to comment Share on other sites More sharing options...
draginvoke5 Posted May 18, 2012 Share Posted May 18, 2012 This works FANTASTIC thanks! I really love this! Link to comment Share on other sites More sharing options...
iHero Posted May 18, 2012 Author Share Posted May 18, 2012 LOL thanks you Link to comment Share on other sites More sharing options...
draginvoke5 Posted May 18, 2012 Share Posted May 18, 2012 @iHero:> LOL thanks youNo problem, it's a very good modification and is easier to implement than others. Link to comment Share on other sites More sharing options...
PVJsquad Posted May 21, 2012 Share Posted May 21, 2012 Can you move the minimap to its upper left corner.because the upper right corner is very sucks to me Link to comment Share on other sites More sharing options...
Stein Posted May 21, 2012 Share Posted May 21, 2012 GoldSlide, just look at the offset codes and change them to render in the location you want. Link to comment Share on other sites More sharing options...
PVJsquad Posted May 21, 2012 Share Posted May 21, 2012 @Scypher:> GoldSlide, just look at the offset codes and change them to render in the location you want.can you tell me ,where the code :? Link to comment Share on other sites More sharing options...
JohnPony Posted May 21, 2012 Share Posted May 21, 2012 ``` CameraX = Camera.Left + 25 + (X * 4) CameraY = Camera.top + 25 + (Y * 4) Engine_BltFast CameraX, CameraY, DDS_MiniMap, NadaRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY```Should be here. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now