(SCRIPT REQUEST) TOWN MAP

Posts

Pages: 1
shadow7396
dick isnt a bad word cause its a nickname for a guy's penis. Anatomy 101.
0
I need a town map script if one isnt already made. What i want it to do is show the map when i select a certain item in my inventory and marks the spot where I'm at on the map.
What engine do you use?

I know of an eventing way. I'm not sure if this works in other engines, but in VXA you can set an item to activate a Common Event by using it. It can be done by adding the 'Call Common Event' feature in the item's features.

Just make sure that the 'Consume?' checkbox is unticked, and the usage is set to 'Only in the Menu' and you'll be off! (unless if you want the town map to be consumable and to pop up in the middle of a battle...)

For the Common Event itself, set it to Autorun with no conditions. Then have a Show Picture command and a Conditional Branch to check if the 'B' button is pressed (to close the said map)

Like this:
~~Town_Map~~ (Set to 'Autorun' with No Conditions)
@> Conditional Branch: If Button 'B' is Pressed
@> >>Exit Event Processing
@> Else
@> Show Picture: townmap


Marking your current position on the map is a bit more complicated though. It will be easier if it only marks the general area nearest to you (like in Pokemon). But if you want pixel-perfect precision, it'll be long and hard...

~To do it like in Pokemon, you have to create a separate icon to represent your character's current position, and then overlay that over the town map. Alternatively, you can just have a series of pre-edited town maps that already have the said icon in key positions. The former will be easier graphics-wise, but harder coding-wise; while the latter is the opposite.

You're going to have to record the current map's ID and match the map to it's area, as it is seen on your map. Depending on the size of your world, this method should work fine.

Example:
Your town map looks like this:
-----(1)-----
---(2)-------
-------------
---------(3)-

Where the numbers are the general areas where the corresponding maps are found.
The variables I used here are: 'Current_Map_Id', 'IconX', 'IconY'

~~Map Icon~~
@>Control Variable: Current_Map_Id == Map ID
@>Conditional Branch: If Current_Map_Id == 1
@> >>Control Variable: IconX == 6
@> >>Control Variable: IconY == 1
@> Show Picture: Variable-
@>Else
@> >>Conditional Branch: If Current_Map_Id == 2
And so on, and so forth...

You're going to have to map the coordinates yourself, though (values of IconX and IconY).
Pages: 1