Is there a way to pass a variable or a symbol to a scene without the use of global variables?
Similar to how Scene_Menu does it with personal commands where it passes the current actor to Scene_Skill, Scene_Equip, or Scene_Status.
Also, how can you call a Scene's method from a different scene (e.g. Scene_Map)? It gives a NoMethod error.
Passing a Variable to a Scene
● ARCHIVED · READ-ONLY
-
-
Scene_Menu doesn't "pass" the current actor. It either sets a variable in $game_party or $game_temp or another global class, which is then accessed by the other scene, or it calls a method from the other scene which sets the variable.
Take a look at how Scene_Shop is handled when called from Game_Interpreter. -
-
Take a look at how Scene_Shop is handled when called from Game_Interpreter.
-
On the scene you've made or any exisitng scene, make a method. In Scene_Shop, it named "def prepare()"
And then, after calling the scene, call the method
Code:SceneManager.call(Scene_Something)SceneManager.scene.prepare(arg1, arg2, etc ...) # <-- This is where you pass the variable into the scene -
Thanks. I thought Scene_Shop was using the global variable method. I'll try these out. Thank you :)