Can't get anything to work, one problem after another just with the Deathmatch demo setup

greatstudios

New member
I've followed the video tutorial. Had resizing issue and got that solved. Now a plethora of errors. AI won't attack because everytime I hit play, it's an error. Each one I address only brings up another. I'm using the assault rifle setup for my agent. I haven't modified anything. i created the character using UCC manager, then the agent using the deathmatch Agent manager. That was all I did.

NullReferenceException: Object reference not set to an instance of an object

Opsive.DeathmatchAIKit.AI.Actions.DetermineWeapon.OnUsedItem (Opsive.UltimateCharacterController.Items.Actions.IUsableItem usableItem) (at Assets/Opsive/DeathmatchAIKit/Scripts/AI/Actions/Attack/DetermineWeapon.cs:309)
Opsive.Shared.Events.InvokableAction`1[T1].Invoke (T1 arg1) (at <52329c5bb9d24a17aa3c9cbeab267298>:0)
Opsive.Shared.Events.EventHandler.ExecuteEvent[T1] (System.Object obj, System.String eventName, T1 arg1) (at <52329c5bb9d24a17aa3c9cbeab267298>:0)
Opsive.UltimateCharacterController.Items.Actions.UsableAction.UseItemUpdateInternal (Opsive.UltimateCharacterController.Character.Abilities.Items.Use useItemAbility) (at Assets/Opsive/UltimateCharacterController/Scripts/Items/Actions/UsableAction.cs:676)
Opsive.UltimateCharacterController.Items.Actions.UsableAction.UseItemUpdate (Opsive.UltimateCharacterController.Character.Abilities.Items.Use useItemAbility) (at Assets/Opsive/UltimateCharacterController/Scripts/Items/Actions/UsableAction.cs:630)
Opsive.UltimateCharacterController.Character.Abilities.Items.Use.LateUpdate () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/Abilities/Items/Use.cs:463)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.LateUpdateActiveAbilities (Opsive.UltimateCharacterController.Character.Abilities.Ability[] abilities, System.Int32& abilityCount) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:679)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion.Update () (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:605)
 
@Justin

No modifications. Just going off the deathmatch demo video setup, mine doesn't work. I have the cube on the 'Character' layer and set it appropriately in the AI agent's 'Character Layer Manager' component. As you see in the image, the agent is raycasting the cube, but won't abort the patrol action. Also, the target field is still null. Why is that since it's supposed to detect colliders on the 'Character' layer?
 

Attachments

  • AI_not_attacking.png
    AI_not_attacking.png
    515.6 KB · Views: 2
Based off of that error there is no weapon stat for the specified Item Definition. On the Deathmatch Agent component make sure you add the weapon stat object for each weapon. I am going to merge this with your other thread since they are likely related.
 
Yep I had done that. I decided to start a new scene and just create the Atlas player agent as you did in the video, copied everything to my AI and it works. I wish I could have done that without the extra steps of creating the player character in a new scene , but it works. Thank you
 
Back
Top