Create Custom NPC Behavior In Unreal Editor
The behavior of an NPC character is defined by their behavior script. The behavior script is what tells characters what actions to take in the world, such as where to go, what to fight, and how to interact with other characters. Characters such as guards and wildlife may have additional behaviors, such as perception, alertness, and the ability to be hired or tamed.
An NPC Behavior is a user-defined Verse script that adds extra functionality to an NPC character’s existing behaviors. The npc_behavior API lets you define code that runs when an NPC character spawns or despawns, and you can use it to create custom characters like medics, shopkeepers, or bosses. NPC Behaviors inherit from the npc_behavior abstract class and require importing the /Fortnite.com/AI module to use.
To run an NPC Behavior Script, you need to attach it to an NPC Character Definition. How an NPC Behavior Script interacts with a character definition depends on the NPC Character type. Custom-type NPCs need a behavior script to perform actions, while Guard and Wildlife-type NPCs will run their default behavior if they aren’t given a behavior script. For more information on creating an NPC Character Definition and the different character types, see the Character Definition page.
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.