This defines a new property on a variable named "Eli" (or redefines it if it already exists) and sets it to Window_Options.prototype.makeCommandList (method reference).
This defines a new, independent variable on the {enclosing block} (e.g. an IIFE) and sets it to Window_Options.prototype.makeCommandList.
The main difference is scope: putting everything as a property of your own global "Eli" variable (a.k.a. "namespace") means they're accessible outside of the plugin (e.g. by script calls or add-on plugins) but less likely be overwritten by accident. Defining function aliases as variables is perfectly OK though: those usually don't need to be referenced outside of the plugin itself, and if you scope them to your plugin that means other plugins can't access them. Typical usage for both cases:
Namespace:
Code:
var Eli = Eli || {}; // global variable, set to current value if it exists or an empty object otherwise
Eli.Window_Options_makeCommandList = Window_Options.prototype.makeCommandList; // property of global object
(function() { // IIFE not required here but doesn't affect how things work
Window_Options.prototype.makeCommandList = function() {
Eli.Window_Options_makeCommandList.call(this); // callback via namespace
};
})();
Local variable:
Code:
(function() { // IIFE for scope: variables defined inside the IIFE are not accessible outside it.
var _Eli_Window_Options_makeCommandList = Window_Options.prototype.makeCommandList;
Window_Options.prototype.makeCommandList = function() {
_Eli_Window_Options_makeCommandList.call(this); // callback via local variable
};
})();
@Eliaquim when your query is fully resolved please Report your post and ask for it to be closed. Mods might not see a post or change of title but they will see a Report.
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!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.