0
\$\begingroup\$

I created a project based on the Top Down Example.

In the project comes a character that I can move by clicking on the terrain that already comes by default.

Image of gameplay:

enter image description here

In the character's blueprint, I added a function on the N KEY. Simply to print a sentence (key N).

Character's blueprint:

enter image description here

I created an NPC based on creating a Blueprint Class > Character:

enter image description here

In the NPC blueprint I added a function, only now in the M KEY, but with the same principle. Print a sentence (key M).

NPC's Blueprint:

enter image description here

It turns out that only the command made in the blueprint of the character works:

enter image description here

I alternately clicked the N and M keys to take the screenshot.

I scanned the character's blueprint to see if something was missing, something I needed to add in order for the NPC blueprint to recognize the keyboard command. But I only found things like that related to the mouse.

Scan:

enter image description here

I'd like to know what I need to do to make the NPC blueprint recognize the M KEY.

\$\endgroup\$
  • \$\begingroup\$ You have to enable input, at the right panel in search box type “input” it will navigate you to the input tab and you will see the option to enable input. \$\endgroup\$ – ColdSteel May 23 at 22:16
  • \$\begingroup\$ @ColdSteel In this tab appeared 3 options: Block Input, Auto Receive Input and Input Priority. None of them seem to be the option you mentioned. \$\endgroup\$ – Boneco Sinforoso May 23 at 22:36
  • \$\begingroup\$ The option I mentioned is obviously the AUTORECIEVEINPUT \$\endgroup\$ – ColdSteel May 23 at 22:55
  • \$\begingroup\$ CharacterBP of the top down template already has it on by default - thats why N did work but M didnt \$\endgroup\$ – ColdSteel May 23 at 22:58
  • \$\begingroup\$ I made the comment because I compared the input tab of the NPC with that of the character and both were the same. And in the receive option, the box next to it appears disabled, but if I click, it displays numerous player options (player 0 through player 7), and does not activate. \$\endgroup\$ – Boneco Sinforoso May 23 at 23:03
0
\$\begingroup\$

In the Pawn section of your AI Character, you will find the option "AI Controller Class"

AI Controller Class

You need to create this controller class in Blueprint. It's not one of the standard options, you'll need to search for it or use the drop down arrows.

AIController AI Controller image

When you've got this and set up your required options in the Pawn section of your AI Character, you can set the relevant code inside this AI Controller Blueprint.

\$\endgroup\$
  • \$\begingroup\$ I created the class. I put the code inside and then set it in the blueprint of the minion. It did not work out here. \$\endgroup\$ – Boneco Sinforoso Jun 18 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.