Original Source
- Original title: MZ How to check if an actor has learned a skill on level up?
- Original author: starguy
- Original date: April 4, 2025
- Source thread: https://forums.rpgmakerweb.com/threads/how-to-check-if-an-actor-has-learned-a-skill-on-level-up.176750/
- Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Javascript/Plugin Support
Summary
I'm using NUUN_Result which is a fairly robust plugin. However I would like to tweak a thing. Around line 5300 within Scene_Battle.prototype.openLevelUpWindow there is this._resultLearnSkillWindow.show(); which I'd like to put in an if statement for if an actor has learned a skill on a level up, then show the window, otherwise don't. Just under that function there's the closeResultWindow function where I think I can just check if the resultLearnSkillWindow is open, then close it, otherwise don't do a thing. I'm asking help to figure out how to create the...
Archived First Post
Around line 5300 within
Scene_Battle.prototype.openLevelUpWindow there is this._resultLearnSkillWindow.show(); which I'd like to put in an if statement for if an actor has learned a skill on a level up, then show the window, otherwise don't. Just under that function there's the closeResultWindow function where I think I can just check if the resultLearnSkillWindow is open, then close it, otherwise don't do a thing.I'm asking help to figure out how to create the if statement to check if an actor has learned a skill on leveling up.
I did find this:
Game_Actor.prototype.levelUp = function() {
this._level++;
for (const learning of this.currentClass().learnings) {
if (learning.level === this._level) {
this.learnSkill(learning.skillId);
}
}
};
But I don't know how to make that work within 'Scene', since it's 'Game_Actor'.
Again, any and all help is appreciated! Thanks!
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadCreator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...