I’m working on a simple narrative quest system using “Switch on Int” in Blueprints. It’s not an adventure game—just small task-based quests like shopping errands.
Here’s a simplified example of the task order I want:
- Talk to an NPC (BP_NPC) to receive the quest
- Open the front door (BP_OpenDoor)
- Interact with an item in a shop (BP_GetItem)
- Return and open the front door again
These tasks should only be completed in sequence. If the player tries to open the door before talking to the NPC, or get the item before opening the door, it should not be allowed.
My current approach:
- I’m using a
Switch on Int
node to control quest progression. - Each task corresponds to a case/pin on the switch (e.g., 1 = BP_NPC, 2 = BP_OpenDoor, etc.).
- After completing one task, I increment an integer variable (
CurrentQuestStep
), and the next case becomes available.
My main questions:
- Where should I manage the “Switch on Int” logic and
CurrentQuestStep
variable?
Should it be in the player, GameMode, or a QuestManager Blueprint? - How can I cleanly communicate between Blueprints like BP_NPC, BP_OpenDoor, and BP_GetItem?
They are separate actors and do not inherit from each other, so casting isn’t ideal.
I know using “Get All Actors of Class” can be performance-heavy, so I want to avoid that. - I tried using Blueprint Interfaces (BPI), but I’m confused about how to get the correct target reference.
For example, fromBP_OpenDoor
, how do I notifyBP_GetItem
that the door has been opened and it can now be interacted with?
I’m looking for the most modular and performance-friendly way to manage quest steps across multiple actor Blueprints, while ensuring the correct task order is enforced.
Any tips on structure, best practices, or communication patterns would be greatly appreciated!