Hi, i’m an Unreal newbie and I’m creating Co-op FPS game in Blueprints.
I’m in situation where my AI can only detect Server-side player while completely ignoring Client-side player.
To detect player I’m using AIPerception. Here’s my logic in AIController class:
Can Sense Function:
Handle Sensed Sight Function:
Additionally, to chase a player I’m using such logic in Enemy class:
What should I do to make AI detect Client-side player?
Hey @zbigniewgrzala!
The thing is, it’s not a server/client thing. You’re only using player index 0 for a lot of these target actors, which is only going to return the first player! Here’s an example:
For instance, here you can replace this with a getClass node, and a check to see if the sensed actor class is equal to your BP_FirstPersonCharacter (or whatever class your players are). If there are multiple possibilities with the same parent use “IsChildClassOf”. Then you can store that as a variable and use it in MC_Chase as well!
Let us know if you run into any more issues! 