Aloha Everyone! I was wondering if one can implement a copy spell, which has the caster copy any spell a monster has.
Thank you for your time.
Thank you for your time.
target = $gameTroop._enemies[$gameTemp._lastActionData[5]-1]._enemyId
if ($dataEnemies[target].meta.skillCopy != "undefined" ){
$gameActors.actor($gameTemp._lastActionData[2]).learnSkill(Number($dataEnemies[target].meta.skillCopy))};
It's fine dude. I'll admit, I am incredibly green when it comes to game design and this engine.
It's fine man. I put this down and it functions, but it's not copying anything for some reason.
target = $gameTroop._enemies[$gameTemp._lastActionData[5]-1]._enemyId
skillId = Number($dataEnemies[target].meta.skillCopy);
thisActor = $gameTemp._lastActionData[2];
if ($dataEnemies[target].meta.skillCopy != "undefined" && skillId > 0){
if ($gameActors.actor(thisActor).skills().includes($dataSkills[skillId])){
BattleManager._logWindow.addText("Skill already learned.")
}else{
$gameActors.actor(thisActor).learnSkill(skillId);
BattleManager._logWindow.addText($gameActors.actor(thisActor)._name+" learned skill!")
};
}else{
BattleManager._logWindow.addText("No Skill to copy");
};
Thank you so much! Now it's working like a charm!
Original thread: https://forums.rpgmakerweb.com/threads/copy-spell.154753/