Hi,

I was trying to setup some player attacks, so I read this tutorial -> TUTORIAL - and did everything like it says.

I setup animation for attacks and when I'm clicking Left Mouse Button (which is attack), then I've got this kind of error:

NullReferenceException: Object reference not set to an instance of an object
GamingIsLove.ORKFramework.UI.ActiveBattleMenu.Show (System.Collections.Generic.List`1[T] list, System.Int32 selection, GamingIsLove.ORKFramework.BattleMenuMode mode, System.Boolean restored) (at <41727751e3ef43309b37fc6a6f3ed237>:0)
GamingIsLove.ORKFramework.UI.ActiveBattleMenu.Show (System.Collections.Generic.List`1[T] list, System.Int32 selection, GamingIsLove.ORKFramework.BattleMenuMode mode) (at <41727751e3ef43309b37fc6a6f3ed237>:0)
GamingIsLove.ORKFramework.UI.AbilityBMItem.Accepted (GamingIsLove.ORKFramework.Combatant owner, System.Boolean useGroupTarget, System.Boolean useIndividualTarget) (at <41727751e3ef43309b37fc6a6f3ed237>:0)
GamingIsLove.ORKFramework.UI.ActiveBattleMenu.StartTargetSelection (GamingIsLove.ORKFramework.IShortcut shortcut, System.Boolean blockBattleCamera, System.Boolean useGroupTarget, System.Boolean useIndividualTarget) (at <41727751e3ef43309b37fc6a6f3ed237>:0)
GamingIsLove.ORKFramework.ActionSelection.UseAbility (GamingIsLove.ORKFramework.Combatant user, GamingIsLove.ORKFramework.AbilityShortcut ability, System.Boolean checkTime, System.Boolean checkUseCosts, System.Boolean checkCanUse, GamingIsLove.ORKFramework.ControlMapTargeting targeting, System.Boolean blockBattleCamera, GamingIsLove.ORKFramework.BaseAction& action) (at <41727751e3ef43309b37fc6a6f3ed237>:0)
GamingIsLove.ORKFramework.ActionSelection.GetAction (GamingIsLove.ORKFramework.BaseAction& action, GamingIsLove.ORKFramework.Combatant combatant, System.Boolean checkTime, System.Boolean checkUseCosts, System.Boolean checkCanUse, GamingIsLove.ORKFramework.ControlMapTargeting targeting, System.Boolean blockBattleCamera, System.Boolean cancelOn2nd) (at <41727751e3ef43309b37fc6a6f3ed237>:0)
GamingIsLove.ORKFramework.ControlMapKey.PerformAction (GamingIsLove.ORKFramework.Combatant combatant) (at <41727751e3ef43309b37fc6a6f3ed237>:0)
GamingIsLove.ORKFramework.ControlMap.Tick (GamingIsLove.ORKFramework.Combatant combatant) (at <41727751e3ef43309b37fc6a6f3ed237>:0)
GamingIsLove.ORKFramework.Combatant.ControlMapTick () (at <41727751e3ef43309b37fc6a6f3ed237>:0)
GamingIsLove.ORKFramework.ORKControlHandler.Tick (System.Boolean interacted) (at <41727751e3ef43309b37fc6a6f3ed237>:0)
GamingIsLove.Makinom.ControlHandler.Tick () (at <ba54554e234445a5a65436c9e76d96c8>:0)
GamingIsLove.Makinom.Maki.FireTick () (at <ba54554e234445a5a65436c9e76d96c8>:0)
GamingIsLove.Makinom.MakinomHandler.Update () (at <ba54554e234445a5a65436c9e76d96c8>:0)


It seems that it's looking for some sort of Battle Menu, but I don't have any and I don't want it, I want my battle to be in real time, but I've already set this up in Makinom.
  • This largely depends on your game's setup - that tutorial is part of a series that needs to be followed step by step. At that part of the series, there's no enemy or battle system added yet, so you can just cause the actions via the control maps as it's set up there.

    However, if you add this to an existing project without e.g. having a Real Time Battle Area added to your scene (comes later in this tutorial series), running into an enemy will most likely cause a different battle system to be used (i.e. the Default Battle System that's et up in Battles > Battle System > General Settings).

    Ultimately, the used battle system has set up if and which battle menu is used.
    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!
  • Hi, I need to update some things...

    - Battle System added (Real Time);
    - Enemy Spawner added (one Human Enemy);
    - Nav Mesh Surface added to the terrain and Nav Mesh Agent added to the enemy;
    - Added a weapon that player collects and equip;
    - Added a Control Map (Attack) to the RMB;

    And then, when player picks up a weapon, equip and want to start a fight, something like that appears:

    NullReferenceException: Object reference not set to an instance of an object
    GamingIsLove.ORKFramework.TargetHighlight.SortAvailalbeTargets () (at <41727751e3ef43309b37fc6a6f3ed237>:0)
    GamingIsLove.ORKFramework.UI.AbilityBMItem.Accepted (GamingIsLove.ORKFramework.Combatant owner, System.Boolean useGroupTarget, System.Boolean useIndividualTarget) (at <41727751e3ef43309b37fc6a6f3ed237>:0)
    GamingIsLove.ORKFramework.UI.ActiveBattleMenu.StartTargetSelection (GamingIsLove.ORKFramework.IShortcut shortcut, System.Boolean blockBattleCamera, System.Boolean useGroupTarget, System.Boolean useIndividualTarget) (at <41727751e3ef43309b37fc6a6f3ed237>:0)
    GamingIsLove.ORKFramework.ActionSelection.UseAbility (GamingIsLove.ORKFramework.Combatant user, GamingIsLove.ORKFramework.AbilityShortcut ability, System.Boolean checkTime, System.Boolean checkUseCosts, System.Boolean checkCanUse, GamingIsLove.ORKFramework.ControlMapTargeting targeting, System.Boolean blockBattleCamera, GamingIsLove.ORKFramework.BaseAction& action) (at <41727751e3ef43309b37fc6a6f3ed237>:0)
    GamingIsLove.ORKFramework.ActionSelection.GetAction (GamingIsLove.ORKFramework.BaseAction& action, GamingIsLove.ORKFramework.Combatant combatant, System.Boolean checkTime, System.Boolean checkUseCosts, System.Boolean checkCanUse, GamingIsLove.ORKFramework.ControlMapTargeting targeting, System.Boolean blockBattleCamera, System.Boolean cancelOn2nd) (at <41727751e3ef43309b37fc6a6f3ed237>:0)
    GamingIsLove.ORKFramework.ControlMapKey.PerformAction (GamingIsLove.ORKFramework.Combatant combatant) (at <41727751e3ef43309b37fc6a6f3ed237>:0)
    GamingIsLove.ORKFramework.ControlMap.Tick (GamingIsLove.ORKFramework.Combatant combatant) (at <41727751e3ef43309b37fc6a6f3ed237>:0)
    GamingIsLove.ORKFramework.Combatant.ControlMapTick () (at <41727751e3ef43309b37fc6a6f3ed237>:0)
    GamingIsLove.ORKFramework.ORKControlHandler.Tick (System.Boolean interacted) (at <41727751e3ef43309b37fc6a6f3ed237>:0)
    GamingIsLove.Makinom.ControlHandler.Tick () (at <ba54554e234445a5a65436c9e76d96c8>:0)
    GamingIsLove.Makinom.Maki.FireTick () (at <ba54554e234445a5a65436c9e76d96c8>:0)
    GamingIsLove.Makinom.MakinomHandler.Update () (at <ba54554e234445a5a65436c9e76d96c8>:0)


    So, the error code is definitely different from the beginning, but still nothing happens... Animations doesn't show up and player doesn't start fighting.
  • I think this is battle menu related - e.g. if you didn't set up a battle menu but have a setup that displays a target selection for an action, that could cause an error.

    Based on the error, this happens when a control map is used to perform an action.
    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!
  • Yes, my control map is used to perform an Attack action. So, it rather has to be "Ability"?

    image
  • Yes - the ability's target selection settings mostly. They define what targeting is used for the action. E.g. the 3D action RPG uses None targeting, so you can just swing around your weapon without having to select a target.

    Your setup most likely uses a single/group target selection, i.e. using the action (also via control maps) will trigger a target selection, which uses the battle menu. If the battle menu isn't set up properly, this can cause errors.
    The control map keys have settings to automatically select targets, though, or not using target selections, etc.

    Ultimately, this comes down to how your system should work - e.g. do you want just untargeted attacks where you swing around your weapon, or something like tab-targeting, etc.
    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.