- Joined
- Jul 19, 2021
- Messages
- 155
- Reaction score
- 250
- First Language
- English
- Primarily Uses
- RMMZ
Alright so it's been 2 months since I last even looked at JS and I forgot most of the advance stuff, the basics slowly coming back. So there's an idea as to where I am with it.
In anycase, tracing my steps with my old scripts, I noticed I never overridden a method that calls another method. It's always been just one method. I suppose 'past me' was doing this on purpose for this very reason, but 'past me' didn't think about future me needing to know this later. (lol)
Taking out the function body to keep it clean/short, how do I override this? apply the alias to the call as well or does only the first method matter?:
The way I had done it for single methods were the syntax of:
In anycase, tracing my steps with my old scripts, I noticed I never overridden a method that calls another method. It's always been just one method. I suppose 'past me' was doing this on purpose for this very reason, but 'past me' didn't think about future me needing to know this later. (lol)
Taking out the function body to keep it clean/short, how do I override this? apply the alias to the call as well or does only the first method matter?:
Code:
Game_Actor.prototype.performAction = function(action) {
Game_Battler.prototype.performAction.call(this, action);
....
}
The way I had done it for single methods were the syntax of:
Code:
(function(alias) {
function header.. {
alias.apply(....);
};
})(function header...);