Map Initialization functions for plugins[Solved]

Icelord888

Veteran
Veteran
Joined
Apr 13, 2018
Messages
42
Reaction score
23
First Language
Romanian
Primarily Uses
RMMV
Hello there game makers, I come here yet again in search of guidance.
In my limited experience with plugins I see that you can write functions and call them via the script call comand, but I also know that you can also extend the game's premade functions to make a propper plugin, so my question is this, which function should I
extend if I want my code to be called each time a player enters a new map?

I am sorry if I am not aware but is there a list detailing what all the existing functions do?


Any suggestions will do,many thanks.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
Game_Map.prototype.setup ?
 

Icelord888

Veteran
Veteran
Joined
Apr 13, 2018
Messages
42
Reaction score
23
First Language
Romanian
Primarily Uses
RMMV
Could work, there are also many .prototype.initialize functions but I guess they are for something else.
I will try it out!
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
no... initialize is called when every map is created.
.setup, or Game_Player.prototype.performTransfer, is what you want.

you need to poke a line between transfer instructions, so that's either during the transfer process, or right after the destination map is ready.
 

Icelord888

Veteran
Veteran
Joined
Apr 13, 2018
Messages
42
Reaction score
23
First Language
Romanian
Primarily Uses
RMMV
Yess I think transfer will do better, or why not both!?
 

Icelord888

Veteran
Veteran
Joined
Apr 13, 2018
Messages
42
Reaction score
23
First Language
Romanian
Primarily Uses
RMMV
Saddly this has no effect, am I doing something wrong?:
(function () {
var _Game_Player_transfer=Game_Player.prototype.performTransfer;
Game_Player.prototype.performTransfer = function()
{
_Game_Player_transfer.call(this);
Do_something();
};

})();
 

Icelord888

Veteran
Veteran
Joined
Apr 13, 2018
Messages
42
Reaction score
23
First Language
Romanian
Primarily Uses
RMMV
Nope I am an idiot, the function works!!!
Thanks your a life savior!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,061
Members
137,575
Latest member
akekaphol101
Top