Adding A New Weapon To Death Match

rsoult3

New member
I am trying to add the bow as a weapon that can be used in death match.

I added the weapon to the agent, but I am still getting exceptions.

Is there a nice tutorial on how to do this? I am just flying blind here.

I added the item here, but I am still having issues.

1640545728948.png

This is my current issue.
NullReferenceException: Object reference not set to an instance of an object
Opsive.DeathmatchAIKit.AI.Actions.DetermineWeapon.OnUpdate () (at Assets/Opsive/DeathmatchAIKit/Scripts/AI/Actions/Attack/DetermineWeapon.cs:254)
BehaviorDesigner.Runtime.BehaviorManager.RunTask (BehaviorDesigner.Runtime.BehaviorManager+BehaviorTree behaviorTree, System.Int32 taskIndex, System.Int32 stackIndex, BehaviorDesigner.Runtime.Tasks.TaskStatus previousStatus) (at <3ed82e893f584901a16bc2e097c74b57>:0)
 
What is null? You either:

- Don't have the DeathmatchAgent component added to your character so m_DeathmatchAgent is null.
- One of your items doesn't exist so allItems is null.
 
What is null? You either:

- Don't have the DeathmatchAgent component added to your character so m_DeathmatchAgent is null.
- One of your items doesn't exist so allItems is null.

I have modified the original prefabs. I am just trying to add a new weapon to the layout.

How do I make sure this new item is in all items?
Is there a tutorial on how to add a weapon to a character so that determine weapon equips the right one?

1640616835972.png
 
Have you tried inserting a breakpoint and seeing what is null? That will indicate what is wrong. This video shows adding a weapon:

 
Top