- Joined
- Jan 23, 2021
- Messages
- 1
- Reaction score
- 0
- First Language
- German
- Primarily Uses
- RMMV
Hey guys,
I'm trying to integrate the shop into the menu. I took the following thread as an example to code the menu command in rpg_scenes.js and rpg_windows.js:
forums.rpgmakerweb.com
Now I'm hitting a wall. I attached the rpg_scenes.js and rpg_windows.js for better insight.
I was able to add the command to the menu in rpg_windows.js and assigned the following function in rpg_scenes.js:
SceneManager.push(Scene_Shop);
SceneManager.prepareNextScene([[0, 2, 0, 0],[0, 3, 0, 0],[3, 1, 1, 10]], true);
which opens the shop with the items just fine.
My problem: No matter how far the player is in the game, it will always be the same shop with the same items. I want the available items to be dynamic with the player's progress though. Since I can't code at all, that would become too complicated and confusing for me. I'm glad I somehow managed to get to this point at all.
So I had the idea that the easiest solution would be to make the command call a common event which opens the shop. This is where I'm stuck. I replaced the SceneManager bit with
$gameTemp.reserveCommonEvent(2);
With common event 2 being the shop. However, this freezes the game. Executing it through a normal script call event works like intended.
What do I have to code instead of SceneManager.push to make the command call a common event? I'm thankful for every little piece of help.
Have a nice weekend.
I'm trying to integrate the shop into the menu. I took the following thread as an example to code the menu command in rpg_scenes.js and rpg_windows.js:
Adding New Commands to the Menu
How does one go about adding a new command to the menu? I've created a window that works in its own scene. Now I simply want to add a command to the menu screen that opens that scene. I have gotten this far on my own (by commenting out the command that adds the "Formation" option): ...
Now I'm hitting a wall. I attached the rpg_scenes.js and rpg_windows.js for better insight.
I was able to add the command to the menu in rpg_windows.js and assigned the following function in rpg_scenes.js:
SceneManager.push(Scene_Shop);
SceneManager.prepareNextScene([[0, 2, 0, 0],[0, 3, 0, 0],[3, 1, 1, 10]], true);
which opens the shop with the items just fine.
My problem: No matter how far the player is in the game, it will always be the same shop with the same items. I want the available items to be dynamic with the player's progress though. Since I can't code at all, that would become too complicated and confusing for me. I'm glad I somehow managed to get to this point at all.
So I had the idea that the easiest solution would be to make the command call a common event which opens the shop. This is where I'm stuck. I replaced the SceneManager bit with
$gameTemp.reserveCommonEvent(2);
With common event 2 being the shop. However, this freezes the game. Executing it through a normal script call event works like intended.
What do I have to code instead of SceneManager.push to make the command call a common event? I'm thankful for every little piece of help.
Have a nice weekend.