Help!

Hello people, I need help with it: I am studying AI behavior by Lewis Newton book and how is an old version and my unreal in the most current version, this error occurred in the process, shown in the image: ‘Third Person Character’ does not inherit from ‘Hero’ (Cast to ThirdPersonCharacter would always fail).

How do I fix this?

ThirdPersonCharacter inherits from Character, I assume Hero does the same.

Since you’re getting all actors of that class, you’ll want to cast it to Hero in order to access the various events, functions and variables available.

So just remove the Cast to … and put Array Element output in target - instigator and this on get pawn controller?
@anonymous_user_fb796d6c: Don’t work =3 /\

No, you’ll still need to cast it*(I think, or maybe that’s only true for widgets)*. So get all Hero actors, loop through them and try and Cast to Hero.

How do you mean about “So get all Hero actors”? And, how can I get all Hero actors? Get all Classes of Actors - Hero?
And loop through them? Before and after this /?


  @Edit: Now, I don't have anymore bugs, but the Enemy don't follow the Hero! Here the 2 blueprints (Find Hero and Chase Hero). Have any bug?

PS: Sorry for the language on blueprints, I think you’ll understand.