Is there any way to change a combatant's Battle Menu, or launch a different Battle Menu, via a Schematic? At the moment I'm doing it by duplicating the combatant's Class, changing the Battle Menu override in the new Class, and then changing Class in the schematic, but it's very awkward and hacky! Is there a better way?
Thx :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
(Or I'll have a go at writing a "Set Combatant Battle Menu" node myself... ;) ).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Thanks for the pointers!
using UnityEngine;
using GamingIsLove.ORKFramework;
using GamingIsLove.ORKFramework.Components;
using System.Collections.Generic;
using GamingIsLove.Makinom;
using GamingIsLove.Makinom.Schematics;
using GamingIsLove.Makinom.Schematics.Nodes;
namespace GamingIsLove.ORKFramework.Schematics.Nodes
{
[EditorHelp("Set Combatant Battle Menu", "Changes the Battle Menu of a combatant.\n", "")]
[NodeInfo("Combatant/Combatant")]
public class SetBattleMenu : BaseSchematicNode
{
[EditorHelp("Battle Menu", "Define the Battle Menu that will be used.")]
public AssetSelection<BattleMenuAsset> newBattleMenu = new AssetSelection<BattleMenuAsset>();
//[EditorSeparator]
//[EditorTitleLabel("Used Object")]
public SchematicObjectSelection usedObject = new SchematicObjectSelection();
public SetBattleMenu()
{
}
public override void Execute(Schematic schematic)
{
Combatant combatant = this.usedObject.GetCombatant(schematic);
combatant.Setting.battleMenu.battleSystem[0].battleMenu = newBattleMenu;
schematic.NodeFinished(this.next);
}
}
}