NPC find targetable

(Alex) #1

There is a block ‘find in player range targetable object’
I need the same but in NPC range.
Can this be implemented somehow?


(Leslie Young) #2

Look at the Blocks under Character > NPC and Character > Control. They allow you to get a reference to characters in an NPC’s detection range. You set up the detection range in the NPC object’s inspector.

(Alex) #3

Are you talking about these blocks?How to make it work?

(Leslie Young) #4

Yes, that returns a character detected by the NPC. if it returns nothing then detection was not yet run for the frame or nothing was in range to be detected (as set up in Inspector). The best place to use it would be during the NPC’s “On Detected Characters” event.