RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[Solved][VX]Script Call event command to learn passives? (YEM Help)

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 56
RMRK Junior
So, I'm using YEM, and I have certain instances--namely, when characters age as part of the story--where I would like to be able to teach a passive skill to a character VIA an event. The reason for this is that I want the aged character (with a new field sprite, face, profile picture, and battle animation set) to have the the learned passives carry
over from the younger version of that character.

I have attempted this VIA the script function in the events editor, but I'm having trouble finding the right code to call the function of the script that would attach a
passive to that character.

I can, of course, just add the state to that character with an event, but it doesn't show the passive associated with that state as having been learned and can be selected again for learning.

I know it has to have something to do with the section with @actor.learn_passive(passive.id), but I cannot figure out how to target a specific actor with it.

If this cannot be done, I'll either have to find a way to code in a linked passive learning, or create some other way of learning these passives I created.

EDIT: Forgot to attach YEM Skill Overhaul. Unlike a lot of YEM, I have not edited this outside of the User Settings. I doubt highly that any of my changes to YEM could affect the function of this script.
« Last Edit: July 18, 2012, 11:49:55 PM by dudeguy119 »

I support:



*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Umm, try:

Code: [Select]
$game_actors[1].learn_passive(5)

Replace 1 with the ID of the actor who you want to learn the passive skill, and replace 5 with the ID of the passive skill.

**
Rep:
Level 56
RMRK Junior
It worked! Yes! Thank you so much. What I had was close to that, but no cigar. I feel a bit dumb for not having thought of that first.

You've already got some special thanks credit in my game (Some of your scripts sparked some original ideas of my own--no plagiarism, I promise). You've been a pretty big inspiration and help. If I had the ability to give rep, you'd have it. Again, thank you!
« Last Edit: July 18, 2012, 11:55:52 PM by dudeguy119 »

I support: