IndexOutOfRangeException: Index was outside the bounds of the array.
GamingIsLove.ORKFramework.Components.BattleComponent.StartBattle () (at <8133a51876674e7193b890c454777dd1>:0)
GamingIsLove.ORKFramework.Components.BattleComponent.StartInteraction (UnityEngine.GameObject startingObject) (at <8133a51876674e7193b890c454777dd1>:0)
GamingIsLove.Makinom.Components.BaseInteractionComponent.StartMoveToInteraction (UnityEngine.GameObject startingObject) (at <88a6be00da074773b4f8e49e8561b8ab>:0)
GamingIsLove.Makinom.Components.BaseInteractionComponent.Interact (UnityEngine.GameObject startingObject) (at <88a6be00da074773b4f8e49e8561b8ab>:0)
GamingIsLove.Makinom.Components.InteractionController.Interact () (at <88a6be00da074773b4f8e49e8561b8ab>:0)
Thanks, for the helpIt looks like you're new here. If you want to get involved, click one of these buttons!
If you want the battle to start on interaction, you need to set up the battle as you want it - e.g. just place your combatant's prefab in the scene where it should be, add the Battle component and set it up with the combatant you want to fight.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Okay, I now have the following set up:
-Combatant "Slime" setup in Makinom with Prefab "Slime"
-Prefab "Slime" placed in scene (same prefab assigned to the combatant)
-Battle Component added to the Slime in scene (Battle component not in prefab)
--Combatant 0 set to Faction: Enemies / Combatant: Slime
Now when I interact with the Battle Component a NEW slime gets spawned. So the question is how to I set the Battle component to use the Slime prefab already in the scene rather than spawn a new one. I tried adding an "Add Combatant" component to the Slime prefab in scene, but that did not work.
I'm using a Battle Start schematic that uses the Spawn Battle Combatants Action, but disabling this does not fix the problem either.
-Mike
- place your combatant prefab in the scene
- add an Add Combatant component to the game object and set up the combatant you want
- add an Interaction Machine component to the game object that starts a schematic with a Start Battle node (using the Machine Object)
If you need the battle to be set up in a special way, you can set it up as you need it and select it in the Add Combatant component's settings as the battle to use. The battle should not have any combatants added and no start type enabled (i.e. it's only used via the combatant).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!