Proper way to pass parameter to new custom scene?

● ARCHIVED · READ-ONLY
Started by Napoleon 6 posts View original ↗
  1. SceneManager.call(Scene_Foo) # How to pass parameters into Scene_Foo?Currently I use (requires 2 lines sadly):

    Scene_Foo.setter = 'sample'SceneManager.call(Scene_Foo)Scene code:

    def self.setter=(value); @@setter=value; endBut that is not really optimal. What did I miss?
  2. I often use

    SceneManager.call(Scene_Something)SceneManager.scene.prepare(args1, args2)There's an example in default script. Look at Scene_Shop
  3. Ah yes that is much better indeed.
  4. alternatively you could store it in $game_temp or $game_system.
  5. I'm not a fan of global variables, even when they are already defined.
  6. I'm not a fan of storing things if I don't actually plan to store them.


    Cause then you have to remember to clear it out. And then suddenly someone else wants to use it cause you provided it, and now you've got more to worry about.