New account registration is temporarily disabled.

CALLING SCENE_MAP VIA SCRIPTING WITHOUT IGNORING COMMON EVENT? RPG MAKER XP

Posts

Pages: 1
Hello, I have a little technical problem wich is driving me crazy and I hope I'm not doing wrong by posting it here. I couldn't find a troubleshooting portion on the page.

I did a little battle system all via common event, wich is kind of simple, but I wanted to use the rpg maker XP Skill Menu and Item menus *without* having to open the principal Menu.

So I modified the scene_skill script and changed the line "$scene = Scene_Menu.new" to "$scene = Scene_Map.new" (if pressing B on skill/item menu) and It was working until I noticed that if the game is running my Common Event battle system, and then I open the Skill menu via Call script command, and then I press B to "call Scene_Map.new" while it goes back to menu, it seems to "skip" or ignore totally my common event Battle system, it simply jumps to the next commands under the Battle system.

I tried adding a "calling common event from script" code, (i don't remember how it is written) but didn't seem to work. While experimenting I noticed that the momment this line "$scene = Scene_Map.new" is interpreted by the program, the game skips my common event.

Please, I really need to finish this or I'm done in my last year of school. Do you have any ideas to solve or, or to do the same an easiest way? (I mean, using skill and item menus without having to create them and using them without the principal menu screen)

If all that made sense...
Skip manipulating the scene, RMXP's default scene handling is awful and rigid. I'd create the window you want directly via a script and handle it that way. Assign it to a global variable and manipulate it using script event commands in your battle system loop. Look at how the default script uses them and replicate it in your common event.
author=GreatRedSpirit
Skip manipulating the scene, RMXP's default scene handling is awful and rigid. I'd create the window you want directly via a script and handle it that way. Assign it to a global variable and manipulate it using script event commands in your battle system loop. Look at how the default script uses them and replicate it in your common event.


So what I should do is: create and replicate the window I want making a new script and manipulate it only with "call script" event commands?
I think that makes sense to me, but the "global variable" not that much, would you explain it to me, please?
You need a reference to the window you create to access it via scripts and a global variable can be accessed anywhere, even by other events. The code for it would be something like (I don't remember the class names):

$your_window = Window_SelectSkill.new
$your_window.visible = false

At the start of your common event battle system. Then later on when you're waiting for user input you can

$game_window.update
if Input.pressed? Input::C
  $game_variables[1] = $your_window.selected_index
(I don't remember how to get what the user selected in RMXP)

The $game_window there is the same $game_window as created above. Any event or script can access this.
Holy smokes it is quite a lot for my head to understand, but it's the best hint I've got so far. I will try to make it work that way.

Thank you very much.
If you have trouble just ask for more help! It shouldn't be too difficult to do but it does take a while to get a good handle on what's going on exactly.
Pages: 1