Hi, I've been following your Game Tutorial and I got everything up and running until Part 18. The first Battle, wherein my game locks up after I select anything from the battle menu (attack, ability, defend, etc) and then select a target. I get the following error on the console.
NullReferenceException: Object reference not set to an instance of an object
ORKFramework.ValueChange.GetModifiedChange (Single change, ORKFramework.Combatant user, ORKFramework.Combatant target, Single damageFactor, Single damageMultiplier)
ORKFramework.ValueChange.GetChange (ORKFramework.Combatant user, ORKFramework.Combatant target, Single damageFactor, Single damageMultiplier, ORKFramework.VariableHandler localVariables, ORKFramework.SelectedDataHandler selectedData)
ORKFramework.StatusChange.CanUse (ORKFramework.Combatant user, ORKFramework.VariableHandler localVariables, ORKFramework.SelectedDataHandler selectedData)
ORKFramework.ActiveAbility.CanUse (ORKFramework.Combatant user, Boolean checkTime, Boolean checkUseCosts, Int32 realID, AbilityActionType actionType, ORKFramework.VariableHandler localVariables, ORKFramework.SelectedDataHandler selectedData)
ORKFramework.Ability.CanUse (ORKFramework.Combatant user, Boolean checkTime, Boolean checkUseCosts, Int32 lvl, AbilityActionType actionType, ORKFramework.VariableHandler localVariables, ORKFramework.SelectedDataHandler selectedData)
ORKFramework.AbilityShortcut.CanUse (ORKFramework.Combatant c, Boolean checkTime, Boolean checkUseCosts)
ORKFramework.BaseAction.CreateAbility (ORKFramework.Combatant user, ORKFramework.AbilityShortcut ability, Int32 lvl)
ORKFramework.AI.Steps.AbilityStep.Execute (System.Int32& currentStep, ORKFramework.Combatant user, System.Collections.Generic.List`1 allies, System.Collections.Generic.List`1 enemies, System.Collections.Generic.List`1 foundTargets)
ORKFramework.AI.BattleAI.GetAction (ORKFramework.Combatant user, System.Collections.Generic.List`1 allies, System.Collections.Generic.List`1 enemies)
ORKFramework.AI.BattleAISelection.GetAction (ORKFramework.Combatant user, System.Collections.Generic.List`1 allies, System.Collections.Generic.List`1 enemies)
ORKFramework.AI.CombatantAI.GetAction (System.Collections.Generic.List`1 allies, System.Collections.Generic.List`1 enemies)
ORKFramework.CombatantActions.Choose (Boolean newTurn, Boolean autoCallMenu)
ORKFramework.TurnBasedBattle+d__74.MoveNext ()
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
This issue happened on two different machines independently following the tutorial, with the Unity version 2017.2
Thanks for your help in advance.

  • Yep, that's a bug, will be fixed in the next update.

    In the meantime, you have to enalbe Use Attribute Changes in all Value Change settings of your abilities and items (e.g. in the Base Attack ability you'll have to do this in the target changes and critical target changes).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks a lot for the reply! It worked just fine.

    If you don't mind me poking you again, is it possible to switch the player combatant from combatant A to combatant B through an event? I'm trying to have a different player model once I enter combat and then go back to the original one once combat is over.

    Thanks again.
  • So, not actually changing the combatant (which would be possible), but just showing a different prefab?

    Check out the Conditional Prefabs in the combatant's settings for that :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.