Hey everybody, this is my first post, I couldn't find an answer to the problem elsewhere so I hope it hasn't been asked yet.
-----Goal------
I would like to have all 4 maps to go to the same item shop, but upon leaving, return to the map they were previously on.
----Situation----
The situation is this, I have a game that has 1 medium sized map, different sections open up after talking to person A, B, C, so on.
To reach this goal the player talks with NPC A, B, C, so on .. each time they talk, they remove an evet blocking their path, to do so I simply change the map with a transfer screen, makes it look magic.
So I have 1 map, copied 4 times.
------Reason-------
For this item shop, it is originally a quest, get this item, return it, voila he now has the enthusiasm to sell again! After that, the item shop opens and the player can return to purchase items, weapons, and armor. Since it's a small gam that focuses on grinding, all items are available from the get go, just have to get enough gold.
-----In Summary-----
I'm open to suggestions, but I just feel so stuck. And considering this is my first game I plan on finishing I want to make a good impression, side missions and all.
THANK YOU SO MUCH FOR YOUR HELP!
you can set a variable to a certain value when you transfer from the map to the shop map, then upon leaving the shop, check the value of the variable and then transfer to the correct map
Your idea for the shop is pretty much exactly how my dimentional rift works.
You wat to set a variable for Map ID, set a variable for player location X, and Y. Then for the transfer event in the shop, leading out, transfer the player using the 3 variables you set.
Note: Eveny gateway on the four maps that send you to the shop, make sure you set the 3 variables(you set the same 3 variables, no need to use different variable, so basically every doorway event leading to the shop, should be the exact same)
you don't need multiples... you just need 1 variable
if you go to shop from map 1, set the variable to 1
if you go from map 2, set it to 2
then when you leave the shop, check the value of the variable... if it's 1, then perform transfer to map 1 and so on
Lol what are you doing that for, it auto resets, no need for setting each map on It's own variable, you're just setting one variable for X map ID(where X is any map you transfer from), and every time you "transfer to the shop" it resets the map ID variable.
To OP: Go to control Variable/Game Data/Map ID to set a map ID Variable Then go to Game Data/Char to set variables for X, and Y.
I never said anything about each map setting it's own variable, as I said it was just 1 variable. It's basically the same as what you're doing, saving the map ID into the variable.
I said set the variable to 1 (which is basically, the MAP ID), and is basically setting just 1 variable to a certain value, not set 1 variable for map 1 then set another variable for map 2 and so on. I suggest you read more carefully next time.
Okay, so there was a small amount of conflict between answers, but I really started to understand it the way Zoltor was describing it, wow, this makes developing single points so much easier, can save a LOT of space too. Thanks to both of you for your amazingly hasty answers!
I think I'll have to agree with Zoltors method the most because it's a quick code that I can use everywhere.
It takes a villiage to help a new game designer figure out a problem!
It is the same method, he simply outlined it in a more direct way 🙂
Well, sorry too, I'm not a fan of giving exact methods... if you understood Zoltor's outline, that's basically the explanation. 🙂
plus you know, doing this while on the office is kinda risky. XD
It sounds like it would be a lot easier to use a set of Conditions in the event which handles the Shop, rather than copying the map 4 times. And, if you're merely doing this to have blocking NPCs unlock map areas, there's a much easier way than copying the map 4 times:
For blocking NPCs, set each to require a Switch to be ON. And, the Intro sets all of the Switches for the blocking NPCs to ON. This makes the blocking NPCs all present at the start.
To make an Intro, set transparency to On (check the System tab in the Database).
Then, start the player in a tiny, empty map. The map contains a single Event set to autorun.
This event displays your Intro text/movie/etc and sets any initial conditions such as the Switches/etc. The last things the event does are transfer the player to the game start proper, then turn transparency off, in that order.
The result is, when a quest completes, turn off the appropriate Switch in the Event and the NPC disappears.
I've just started RPG maker myself, but have a lot of programming experience (none in Ruby though).
My advice: If you want to accomplish something, see if a combination of Switches/Variables and event conditions can do it.
I forgot when I wrote it, and after I hit "post" I've seen that Zoltor already posted one so I didn't edit it.