NPC Management

This system allows NPCs to interact with the player via the phone. The functions are split into two groups based on the required reference.

1. Functions via BP_BaseNPCPhoneControl

These functions are located within the BP_BaseNPCPhoneControl class. To use them, you must first access the NPC Phone Object List (a Map variable) inside the AC_PhoneComponent, find the specific NPC by their phone number, and use that reference as the Target.

  • Send Message: Sends a text message from the NPC to the player. You can set the message text and a specific delay before the message arrives.

  • Send Photo to Player: Sends a specific image to the player’s phone. You can select the image using the Texture input.

  • Send Money to Player: Directly adds money to the player’s bank account. You can specify the Amount and a Send Delay.

  • Send NPCTarget: Commands the NPC to travel to a specific actor.

    • Target Actor: A manual reference to the actor you want the NPC to move toward.

    • FindNPCDetails (Structure): Used to dynamically locate an actor within the level. This is optional but highly useful for finding targets without direct references. It includes:

      • Class: The specific class of the actor to search for.

      • Tag: The unique tag assigned to the target actor.

      • Index: The specific index of the actor if multiple actors with the same class/tag exist.

    • Override Logic: If the FindNPCDetails fields are filled, it will override the Target Actor input. You do not need to provide a manual reference if you are using this structure to find the target.

    • Acceptance Radius: Determines how close the NPC must get to the target to consider the movement complete.

    • Follow Mode:

      • Enabled: The NPC will continuously track and follow the target if it moves.

      • Disabled: The event concludes as soon as the NPC reaches the target for the first time.


2. Functions via AC_PhoneComponent

These functions are more direct and only require a reference to the AC_PhoneComponent (usually found on the player character).

  • Send Sound Player with Delay: Plays a specific sound file for the player. Even though it's called from the component, you can assign an NPC phone number (e.g., 555) to make it appear as if that NPC is calling or sending a voice note. You can control the Sound file, Duration, and Delay.

Example:

3)NPC Control Received Event List

Last updated