Access Scene Function from Game_System

izyees

My Secret Santa
Veteran
Joined
Oct 24, 2015
Messages
248
Reaction score
67
First Language
english
hey guys, I'm new to javascript and what I don't know is how to access a scene_map function from game_system.

I know  I can access game_system from scene_map by $gameSystem.

but how to vice versa?

I have try

var $sceneMap = new Scene_Map();and call it in Game_system

$sceneMap.myStuff(string, number)but it not work. can someone help me.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
you can't access the Scene_Map content (since it's require a ID) UNLESS you recognize the ID

you have to access via Game_Map 
 

izyees

My Secret Santa
Veteran
Joined
Oct 24, 2015
Messages
248
Reaction score
67
First Language
english
you can't access the Scene_Map content (since it's require a ID) UNLESS you recognize the ID

you have to access via Game_Map 
can you show some example?

can I do $gameMap(id).myStuff(string, number)

if so, how to get current map id?
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
like I said you can't access the scene stuff via Game_System simply because the way's it's work

and getting the current map_id in JS I don't remember I would have to look 

but this would not work simply because when you do new Scene_Map

you call a NEW instance of map's so it's like you was making a refresh and scene not work at all like that you can't just extract the function from the scene to a Game_Object
 

izyees

My Secret Santa
Veteran
Joined
Oct 24, 2015
Messages
248
Reaction score
67
First Language
english
btw, can I addChild for scene map from game_system.

example:

Game_System.prototype.createmyWindow = function(title) { this._testWindow = new Window_test(title); Scene_Map.addChild(this._testWindow);}I use Scene_Map.addChild. Will this work?
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
no you can't this not how Stage work's just work internal instead 
 

izyees

My Secret Santa
Veteran
Joined
Oct 24, 2015
Messages
248
Reaction score
67
First Language
english
Ah... nevermind. what I need to do is define a variable.

Thanks for help.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,018
Messages
1,018,357
Members
137,803
Latest member
andrewcole
Top