Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Map showing


Albireo85
 Share

Recommended Posts

[background=rgba(255, 255, 255, 0.803922)]I hope this in the right section[/background]

[background=rgba(255, 255, 255, 0.803922)]would be possible to add a button to display a map in the game[/background]

[background=rgba(255, 255, 255, 0.803922)]Example:[/background]

[background=rgba(255, 255, 255, 0.803922)]1\. map name, and location of area[/background]

[background=rgba(255, 255, 255, 0.803922)]2\. new button to activate map[/background]

[background=rgba(255, 255, 255, 0.803922)]![](http://oi41.tinypic.com/312fpt1.jpg)[/background]

[background=rgba(255, 255, 255, 0.803922)]Example 2:[/background]

[background=rgba(255, 255, 255, 0.803922)]when the button is activated, it will show a map and give siertas locations, so the player could know the area that you are.[/background]

[background=rgba(255, 255, 255, 0.803922)]![](http://oi41.tinypic.com/25s4f3r.jpg)[/background]

[background=rgba(255, 255, 255, 0.803922)]as you can see in the map title says A1 and the map image is where your location..[/background]

[background=rgba(255, 255, 255, 0.803922)]I hope you can understand, but my English is bad and I hope this is possible, because this would help a lot to the players[/background]
Link to comment
Share on other sites

Yes its very possible and not all that hard, first you gotta add another imgbutton and a new frame with the map image, then set the image button click to be like button click frmmainmap.visible = notfrmmainmap.visible the part to make it show where you are on the map would be a bit harder
Link to comment
Share on other sites

Why render an entire form when you can just render a picture box like nearly every other in-game menu? More efficient for programming and executing.

A grid is one thing, quite simple. A map is quite another. Unless you have some way of making the graphics, a generated map would take a lot of processing power. VB6 is such a hog haha! Plus a generated map would take a fair bit of programming and debugging. If you had thumbnails of the maps, you could just render them over the grid, and then render the player position on top. Either way, this is going to be a lot of work for you.

IMO for this to run well you'd also have to add a couple attribute under MapRec - something like GridX as Long, GridY As Long to store the map's location in the grid. You'd need a spot for these in the map editor, and to update the mapediting subs, sends, and handles. I'd recommend also storing in a new modGeneral variable "Public GameMap(0 to 100) As Long" the mapnumber of the grid slot (i've used 100 because it's the 10x10 in your example). The most intuitive indexing would probably be (Number -1)*10 + (LetterNumber-1). With GridX and GridY variables, you can easily add the grid location after the map name.
Link to comment
Share on other sites

I do not want to generate a map I want to display an image in PNG format, and the map will be displayed only one image

Example:

![](http://4.bp.blogspot.com/-hMLTKOOyV6Q/TrPQC8lKe5I/AAAAAAAAAE8/lEjvc_S3HQg/s1600/Fasdal_city_map.jpg)

just be an image
Link to comment
Share on other sites

Well, if you've got a map, just make extra atlasx,atlasy variables in the maprec and for editing in the mapeditor. Then render a "you are here" style thing on top of the map using those x,y coordinates. Might be easiest to just store the picture as an item or a misc and then render the item texture. X by y (in pixels) coordinates would work much better than a 10x10 grid.

Look at how the up/down/left/right variables are stored in the mapeditor, and mimic those for two new coordinate variables. You'll need to add an input method for each in frmMapEditor. You'll also need to mimic the send and handle data subs for maps and map editing to include the new variables.

To render the map, you'll first need to load it as a texture. Look under the GUI textures - probably the best spot. If going the GUI route, you'll also need to add the GUI in modGeneral InitialiseGUI and in modInput's OpenGUIwindow. Name your file the next ascending number in the GUI folder, and have the filenum equal to the GUI number.

Look at how the other buttons work to display GUIs. It's basically when the mouse goes down and then back up on a button, it goes to a select case in OpenGUIWindow and the relevant guiwindow(GUI_####).visible switches in value. You will need to add another button, and another select case in modinput's menu_mousedown and menu_mouseup. You won't need any mouse functions in the map itself unless you want to add a close button in the mapwindow itself (if you do, you'll also need to add in another button, which is another 6-10 steps). You'll need to add the GUI in HandleMouseMove if you want it to be draggable.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...