Demo agent Query

Hello sir,

Can you please help me on NPC fight and use weapons with demo NPC.

I have choked in demo seen there is a demo player with demo NPC. demo NPC moves around on specific areas and when player near that NPC then NPC will attack the player. That attack is using the body. Can you please help me with this add pistol weapons attack when player near to NPC.

Please guide me.

Thank you, sir:)
Have a nice day!
 

Andrew

Moderator
Staff member
The demo's Agent Nolan contains the Melee Agent component, which is a basic AI agent example script, which fires the Use ability when the enemy player is within a certain distance. You can use this as a base and extend it to add additional parameters, checks, etc. For creating more complex behaviour patterns, you should look into the Behaviour Designer package, which was built for designing complex AI behaviour trees.

If you just want to change what item it uses, you can add item objects to the agent character in the manager: Tools -> Opsive -> Ultimate Character Controller -> Item Manager -> New Item. Here you'd set the "Character" to be the agent object and fill in the rest of the fields accordingly. You'd then want to edit the agent character's default inventory in its Inventory component.
 
Hello sir,

Thanks for the reply :)

I have added that item in inventory and set values of useability. that ability active when player near to player but pistol does not fire at that time. So, there is an issue with pistol shooting and also not play the animation. Can you please let me know about these things?

If you want to check then I will share its video or screenshot of the properties of that.

Thanks :)
 

Andrew

Moderator
Staff member
Does your agent character's animator controller to contain the firing animation? And you'll need to set up the weapon's animator ID just as you would with the player character. This video provides details on setting up shootable weapons:

 
Hello sir,

Thanks for your reply :)

I will check it again. I have already set these things as per vidoe then also I will check it again.

Thank you :)
Have a nice day!
 
Top