KDawg08 Posted December 9, 2008 Author Share Posted December 9, 2008 Hey I modified my Map Editor in VB6…But I'm getting a couple errors, No error codes or anything but i know something isn't right. My Attributes aren't showing up, And My tilesheet is only showing 1 tile wide by about 10 in height, which the height is perfect the tile width is not...Here is a screenshot of the edit in vb6![](http://img.photobucket.com/albums/v453/Touchmynonospot/Delirium%202D/MapEditorVB1.png)Here is an image in game…![](http://img.photobucket.com/albums/v453/Touchmynonospot/Delirium%202D/MapEditorInGame1.png)The vbp frm codes are EXACTLY the same aside of the resizes… Link to comment Share on other sites More sharing options...
KDawg08 Posted December 10, 2008 Author Share Posted December 10, 2008 If I need to post the code for frmMapEditor please let me know. Link to comment Share on other sites More sharing options...
unnown Posted December 10, 2008 Share Posted December 10, 2008 you have to post the code, somehow it resizes somewhere, (or the big black part isn't visible in your source? Link to comment Share on other sites More sharing options...
KDawg08 Posted December 10, 2008 Author Share Posted December 10, 2008 ```[cide]Option ExplicitDim KeyShift As BooleanPrivate Sub cmdED_Click() If Me.MousePointer = 2 Or frmMirage.MousePointer = 2 Then Me.MousePointer = 1 frmMirage.MousePointer = 1 Else Me.MousePointer = 2 frmMirage.MousePointer = 2 End IfEnd SubPrivate Sub cmdExit_Click() Dim X As Long X = MsgBox("Are you sure you want to discard your changes?", vbYesNo) If X = vbNo Then Exit Sub End If Call EditorCancelEnd SubPrivate Sub cmdFill_Click() Dim y As Long Dim X As Long X = MsgBox("Are you sure you want to fill the map?", vbYesNo) If X = vbNo Then Exit Sub End If If MapEditorSelectedType = 1 Then For y = 0 To MAX_MAPY For X = 0 To MAX_MAPX With Map(GetPlayerMap(MyIndex)).Tile(X, y) If Me.optGround.Value Then .Ground = EditorTileY * TilesInSheets + EditorTileX .GroundSet = EditorSet End If If Me.optMask.Value Then .Mask = EditorTileY * TilesInSheets + EditorTileX .MaskSet = EditorSet End If If Me.optAnim.Value Then .Anim = EditorTileY * TilesInSheets + EditorTileX .AnimSet = EditorSet End If If Me.optMask2.Value Then .Mask2 = EditorTileY * TilesInSheets + EditorTileX .Mask2Set = EditorSet End If If Me.optM2Anim.Value Then .M2Anim = EditorTileY * TilesInSheets + EditorTileX .M2AnimSet = EditorSet End If If Me.optFringe.Value Then .Fringe = EditorTileY * TilesInSheets + EditorTileX .FringeSet = EditorSet End If If Me.optFAnim.Value Then .FAnim = EditorTileY * TilesInSheets + EditorTileX .FAnimSet = EditorSet End If If Me.optFringe2.Value Then .Fringe2 = EditorTileY * TilesInSheets + EditorTileX .Fringe2Set = EditorSet End If If Me.optF2Anim.Value Then .F2Anim = EditorTileY * TilesInSheets + EditorTileX .F2AnimSet = EditorSet End If End With Next X Next y ElseIf MapEditorSelectedType = 2 Then For y = 0 To MAX_MAPY For X = 0 To MAX_MAPX With Map(GetPlayerMap(MyIndex)).Tile(X, y) If Me.optBlocked.Value Then .Type = TILE_TYPE_BLOCKED End If If Me.optWarp.Value Then .Type = TILE_TYPE_WARP .Data1 = EditorWarpMap .Data2 = EditorWarpX .Data3 = EditorWarpY .String1 = vbNullString .String2 = vbNullString .String3 = vbNullString End If If Me.optHeal.Value Then .Type = TILE_TYPE_HEAL .Data1 = 0 .Data2 = 0 .Data3 = 0 .String1 = vbNullString .String2 = vbNullString .String3 = vbNullString End If If Me.optKill.Value Then .Type = TILE_TYPE_KILL .Data1 = 0 .Data2 = 0 .Data3 = 0 .String1 = vbNullString .String2 = vbNullString .String3 = vbNullString End If If Me.optItem.Value Then .Type = TILE_TYPE_ITEM .Data1 = ItemEditorNum .Data2 = ItemEditorValue .Data3 = 0 .String1 = vbNullString .String2 = vbNullString .String3 = vbNullString End If If Me.optNpcAvoid.Value Then .Type = TILE_TYPE_NPCAVOID .Data1 = 0 .Data2 = 0 .Data3 = 0 .String1 = vbNullString .String2 = vbNullString .String3 = vbNullString End If If Me.optKey.Value Then .Type = TILE_TYPE_KEY .Data1 = KeyEditorNum .Data2 = KeyEditorTake .Data3 = 0 .String1 = vbNullString .String2 = vbNullString .String3 = vbNullString End If If Me.optKeyOpen.Value Then .Type = TILE_TYPE_KEYOPEN .Data1 = KeyOpenEditorX .Data2 = KeyOpenEditorY .Data3 = 0 .String1 = KeyOpenEditorMsg .String2 = vbNullString .String3 = vbNullString End If If Me.optShop.Value Then .Type = TILE_TYPE_SHOP .Data1 = EditorShopNum .Data2 = 0 .Data3 = 0 .String1 = vbNullString .String2 = vbNullString .String3 = vbNullString End If If Me.optCBlock.Value Then .Type = TILE_TYPE_CBLOCK .Data1 = EditorItemNum1 .Data2 = EditorItemNum2 .Data3 = EditorItemNum3 .String1 = vbNullString .String2 = vbNullString .String3 = vbNullString End If If Me.optArena.Value Then .Type = TILE_TYPE_ARENA .Data1 = Arena1 .Data2 = Arena2 .Data3 = Arena3 .String1 = vbNullString .String2 = vbNullString .String3 = vbNullString End If If Me.optSound.Value Then .Type = TILE_TYPE_SOUND .Data1 = 0 .Data2 = 0 .Data3 = 0 .String1 = SoundFileName .String2 = vbNullString .String3 = vbNullString End If If Me.optSprite.Value Then .Type = TILE_TYPE_SPRITE_CHANGE .Data1 = SpritePic .Data2 = SpriteItem .Data3 = SpritePrice .String1 = vbNullString .String2 = vbNullString .String3 = vbNullString End If If Me.optSign.Value Then .Type = TILE_TYPE_SIGN .Data1 = 0 .Data2 = 0 .Data3 = 0 .String1 = SignLine1 .String2 = SignLine2 .String3 = SignLine3 End If If Me.optDoor.Value Then .Type = TILE_TYPE_DOOR .Data1 = 0 .Data2 = 0 .Data3 = 0 .String1 = vbNullString .String2 = vbNullString .String3 = vbNullString End If If Me.optNotice.Value Then .Type = TILE_TYPE_NOTICE .Data1 = 0 .Data2 = 0 .Data3 = 0 .String1 = NoticeTitle .String2 = NoticeText .String3 = NoticeSound End If If Me.optChest.Value Then .Type = TILE_TYPE_CHEST .Data1 = 0 .Data2 = 0 .Data3 = 0 .String1 = vbNullString .String2 = vbNullString .String3 = vbNullString End If If Me.optClassChange.Value Then .Type = TILE_TYPE_CLASS_CHANGE .Data1 = ClassChange .Data2 = ClassChangeReq .Data3 = 0 .String1 = vbNullString .String2 = vbNullString .String3 = vbNullString End If If Me.optScripted.Value Then .Type = TILE_TYPE_SCRIPTED .Data1 = ScriptNum .Data2 = 0 .Data3 = 0 .String1 = vbNullString .String2 = vbNullString .String3 = vbNullString End If If Me.optGuildBlock.Value Then .Type = TILE_TYPE_GUILDBLOCK .Data1 = 0 .Data2 = 0 .Data3 = 0 .String1 = GuildBlock .String2 = vbNullString .String3 = vbNullString End If If Me.optBank.Value Then .Type = TILE_TYPE_BANK .Data1 = 0 .Data2 = 0 .Data3 = 0 .String1 = vbNullString .String2 = vbNullString .String3 = vbNullString End If If Me.OptGHook.Value Then .Type = TILE_TYPE_HOOKSHOT .Data1 = 0 .Data2 = 0 .Data3 = 0 .String1 = vbNullString .String2 = vbNullString .String3 = vbNullString End If End With Next X Next y ElseIf MapEditorSelectedType = 3 Then For y = 0 To MAX_MAPY For X = 0 To MAX_MAPX Map(GetPlayerMap(MyIndex)).Tile(X, y).light = EditorTileY * TilesInSheets + EditorTileX Next X Next y End IfEnd SubPrivate Sub cmdGrid_Click() If GridMode = 0 Then GridMode = 1 Else GridMode = 0 End IfEnd SubPrivate Sub cmdScreeny_Click() If ScreenMode = 0 Then ScreenMode = 1 Else ScreenMode = 0 End IfEnd SubPrivate Sub cmddaynight_Click() If NightMode = 0 Then NightMode = 1 Else NightMode = 0 End IfEnd SubPrivate Sub cmdProp_Click() frmMapProperties.Show vbModalEnd SubPrivate Sub cmdSave_Click() Dim X As Long X = MsgBox("Are you sure you want to make these changes?", vbYesNo) If X = vbNo Then Exit Sub End If Call EditorSendEnd SubPrivate Sub cmdtype_Click(Index As Integer) If Index = 1 Then MapEditorSelectedType = 1 Me.fraAttribs.Visible = False Me.fraLayers.Visible = True Me.frmtile.Visible = True ElseIf Index = 2 Then MapEditorSelectedType = 2 Me.shpSelected.Width = 32 Me.shpSelected.Height = 32 Me.fraLayers.Visible = False Me.frmtile.Visible = False Me.fraAttribs.Visible = True Else MapEditorSelectedType = 3 Me.fraAttribs.Visible = False Me.fraLayers.Visible = False Me.frmtile.Visible = False Me.Option1(10).Value = True Me.picBackSelect.Picture = LoadPicture(App.Path & "\GFX\Tiles10.bmp") EditorSet = 10 scrlPicture.Max = Int((picBackSelect.Height - picBack.Height) / PIC_Y) End IfEnd SubPrivate Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyShift Then KeyShift = True End IfEnd SubPrivate Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyShift Then KeyShift = False End IfEnd SubPrivate Sub optClick_Click() frmClick.Show vbModalEnd SubPrivate Sub optGuildBlock_Click() frmGuildBlock.Show vbModal frmGuildBlock.txtGuild.Text = vbNullStringEnd SubPrivate Sub Option1_Click(Index As Integer) Option1(Index).Value = True Me.picBackSelect.Picture = LoadPicture(App.Path & "\GFX\Tiles" & Index & ".bmp") EditorSet = Index scrlPicture.Max = Int((picBackSelect.Height - picBack.Height) / PIC_Y)End SubPrivate Sub optMinusStat_Click() frmMinusStat.Show frmMinusStat.scrlNum1.Value = MinusHp frmMinusStat.lblNum1.Caption = MinusHp frmMinusStat.scrlNum2.Value = MinusMp frmMinusStat.lblNum2.Caption = MinusMp frmMinusStat.scrlNum3.Value = MinusSp frmMinusStat.lblNum3.Caption = MinusSp frmMinusStat.Text1.Text = MessageMinusEnd SubPrivate Sub optRoof_Click() frmRoofTile.Show vbModalEnd SubPrivate Sub picBackSelect_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyShift Then KeyShift = True End IfEnd SubPrivate Sub picBackSelect_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyShift Then KeyShift = False End IfEnd SubPrivate Sub picBackSelect_MouseDown(Button As Integer, Shift As Integer, X As Single, y As Single) If Button = 1 Then If Not KeyShift Then Call EditorChooseTile(Button, Shift, X, y) shpSelected.Width = 32 shpSelected.Height = 32 Else EditorTileX = Int(X / PIC_X) EditorTileY = Int(y / PIC_Y) If Int(EditorTileX * PIC_X) >= shpSelected.Left + shpSelected.Width Then EditorTileX = Int(EditorTileX * PIC_X + PIC_X) - (shpSelected.Left + shpSelected.Width) shpSelected.Width = shpSelected.Width + Int(EditorTileX) Else If shpSelected.Width > PIC_X Then If Int(EditorTileX * PIC_X) >= shpSelected.Left Then EditorTileX = (EditorTileX * PIC_X + PIC_X) - (shpSelected.Left + shpSelected.Width) shpSelected.Width = shpSelected.Width + Int(EditorTileX) End If End If End If If Int(EditorTileY * PIC_Y) >= shpSelected.Top + shpSelected.Height Then EditorTileY = Int(EditorTileY * PIC_Y + PIC_Y) - (shpSelected.Top + shpSelected.Height) shpSelected.Height = shpSelected.Height + Int(EditorTileY) Else If shpSelected.Height > PIC_Y Then If Int(EditorTileY * PIC_Y) >= shpSelected.Top Then EditorTileY = (EditorTileY * PIC_Y + PIC_Y) - (shpSelected.Top + shpSelected.Height) shpSelected.Height = shpSelected.Height + Int(EditorTileY) End If End If End If End If End If If MapEditorSelectedType = 2 Then shpSelected.Width = 32 shpSelected.Height = 32 End If EditorTileX = Int((shpSelected.Left + PIC_X) / PIC_X) EditorTileY = Int((shpSelected.Top + PIC_Y) / PIC_Y)End SubPrivate Sub picBackSelect_MouseMove(Button As Integer, Shift As Integer, X As Single, y As Single) If Button = 1 Then If Not KeyShift Then Call EditorChooseTile(Button, Shift, X, y) shpSelected.Width = 32 shpSelected.Height = 32 Else EditorTileX = Int(X / PIC_X) EditorTileY = Int(y / PIC_Y) If Int(EditorTileX * PIC_X) >= shpSelected.Left + shpSelected.Width Then EditorTileX = Int(EditorTileX * PIC_X + PIC_X) - (shpSelected.Left + shpSelected.Width) shpSelected.Width = shpSelected.Width + Int(EditorTileX) Else If shpSelected.Width > PIC_X Then If Int(EditorTileX * PIC_X) >= shpSelected.Left Then EditorTileX = (EditorTileX * PIC_X + PIC_X) - (shpSelected.Left + shpSelected.Width) shpSelected.Width = shpSelected.Width + Int(EditorTileX) End If End If End If If Int(EditorTileY * PIC_Y) >= shpSelected.Top + shpSelected.Height Then EditorTileY = Int(EditorTileY * PIC_Y + PIC_Y) - (shpSelected.Top + shpSelected.Height) shpSelected.Height = shpSelected.Height + Int(EditorTileY) Else If shpSelected.Height > PIC_Y Then If Int(EditorTileY * PIC_Y) >= shpSelected.Top Then EditorTileY = (EditorTileY * PIC_Y + PIC_Y) - (shpSelected.Top + shpSelected.Height) shpSelected.Height = shpSelected.Height + Int(EditorTileY) End If End If End If End If End If If MapEditorSelectedType = 2 Then shpSelected.Width = 32 shpSelected.Height = 32 End If EditorTileX = Int(shpSelected.Left / PIC_X) EditorTileY = Int(shpSelected.Top / PIC_Y)End SubPrivate Sub scrlPicture_Change() Call EditorTileScrollEnd SubPrivate Sub optArena_Click() frmArena.Show vbModalEnd SubPrivate Sub optCBlock_Click() frmBClass.scrlNum1.Max = Max_Classes frmBClass.scrlNum2.Max = Max_Classes frmBClass.scrlNum3.Max = Max_Classes frmBClass.Show vbModalEnd SubPrivate Sub optClassChange_Click() frmClassChange.scrlClass.Max = Max_Classes frmClassChange.scrlReqClass.Max = Max_Classes frmClassChange.Show vbModalEnd SubPrivate Sub optWarp_Click() frmMapWarp.Show vbModalEnd SubPrivate Sub optItem_Click() frmMapItem.scrlItem.Value = 1 frmMapItem.Show vbModalEnd SubPrivate Sub optKey_Click() frmMapKey.Show vbModalEnd SubPrivate Sub optKeyOpen_Click() frmKeyOpen.Show vbModalEnd SubPrivate Sub optNotice_Click() frmNotice.Show vbModalEnd SubPrivate Sub optScripted_Click() frmScript.Show vbModalEnd SubPrivate Sub optShop_Click() frmShop.scrlNum.Max = MAX_SHOPS frmShop.Show vbModalEnd SubPrivate Sub optSign_Click() frmSign.Show vbModalEnd SubPrivate Sub optSound_Click() frmSound.Show vbModalEnd SubPrivate Sub optSprite_Click() If SpriteSize = 1 Then frmSpriteChange.picSprite.Height = 960 End If frmSpriteChange.scrlItem.Max = MAX_ITEMS frmSpriteChange.Show vbModalEnd SubPrivate Sub cmdClear_Click() Call EditorClearLayerEnd SubPrivate Sub cmdClear2_Click() Call EditorClearAttribsEnd SubPrivate Sub optHouse_Click() frmHouse.scrlItem.Max = MAX_ITEMS frmHouse.Show vbModalEnd Sub```And here is a link to my newest Map Editor Form: [Thanks for taking the time to help. :)](http://rapidshare.com/files/172036998/frmMapEditor.frm.html=Custom) Link to comment Share on other sites More sharing options...
Tyr Posted December 10, 2008 Share Posted December 10, 2008 try to no resize the tile displayer, only adjust the hights and stuff of the command bars and buttons. it should work :) Link to comment Share on other sites More sharing options...
KDawg08 Posted December 10, 2008 Author Share Posted December 10, 2008 That's what I attempted to do… everything else was just moved around a little. Link to comment Share on other sites More sharing options...
Lenton Posted December 10, 2008 Share Posted December 10, 2008 Maybe search for what the black box is called in your frmMpEditor.You might find where it resizes it. Link to comment Share on other sites More sharing options...
KDawg08 Posted December 10, 2008 Author Share Posted December 10, 2008 @Lenton:> Maybe search for what the black box is called in your frmMpEditor.> > You might find where it resizes it.it's called picBACKsizes on it are weird…Height:3600Width:3960ScaleHeight:240ScaleWidth:264I'm not sure what i'd remake these into... Link to comment Share on other sites More sharing options...
Lenton Posted December 10, 2008 Share Posted December 10, 2008 If that's just the properties of picBACK it won't make a difference to what you change them to.picBACK's size gets changed somewhere in the source.. You need to find where it gets changed (searching is the best option) and remove that code so it stays the same to what you set it to. Link to comment Share on other sites More sharing options...
KDawg08 Posted December 10, 2008 Author Share Posted December 10, 2008 I think this would be it but the width is pretty wide for something that isn't working out…``` frmMapEditor.scrlPicture.Max = Int((frmMapEditor.picBackSelect.Height - frmMapEditor.picBack.Height) / PIC_Y) frmMapEditor.picBack.Width = 448``` Link to comment Share on other sites More sharing options...
Tyr Posted December 12, 2008 Share Posted December 12, 2008 Width:3960vspicBack.Width = 448its pretty small lol, change 488 to 3960. Link to comment Share on other sites More sharing options...
KDawg08 Posted December 12, 2008 Author Share Posted December 12, 2008 @Tyr:> Width:3960> vs> picBack.Width = 448> > its pretty small lol, change 488 to 3960.Okay now what about the attributes on the bottom? That isn't a width problem it just disappears completely…[Edit]Fixed, i clicked on it and it was set to Visible=FalseAwesome, Thanks for all the help everyone, this is finally starting to make sense and work out :D**New issue!!!!!!!!!!!**When i try to change layers/attributes or any of that, it won't work as they're all on the same page now… Any suggestions how to fix that? it's stuck on ground layer.**Also!!!!!!!!!!!**When editting the map… It doesn't choose the parts that I am really clicking on to post, i click on grass and a tree trunk shows up on the ground, i click no the tree and roof tile shows up on ground... Link to comment Share on other sites More sharing options...
Tribal Posted December 26, 2008 Share Posted December 26, 2008 You most likely moved picBACK around. I suggest unzipping frmMapEditor to your source folder. That will set things back to default. Link to comment Share on other sites More sharing options...
KDawg08 Posted January 7, 2009 Author Share Posted January 7, 2009 @The:> You most likely moved picBACK around. I suggest unzipping frmMapEditor to your source folder. That will set things back to default.sorry for the late response… I did move picBACK around intentionally to match the rest to set everything up as planned but something still isn't working properly 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