so i have 2 cutscenes that i want to play on 2 diffrent npcs. but if i press e on the first npc both cutscenes start playing at the same time. how do i make it so that i can play the first one and after that one is finished and you press E on the other npc that the 2nd will play?
What you’re looking for is a way to prevent the second cutscene from triggering until the first one is fully finished—and for that, you can add a gameplay flag (boolean variable) to control flow between the two.
Here’s a simple approach:
-
Create a boolean variable like
bFirstCutsceneCompleted. -
Set it to false by default.
-
When the first cutscene ends (you can bind an event to its
OnFinishedor use aDelaythat matches its length), setbFirstCutsceneCompletedto true. -
Before the second NPC logic runs, check if
bFirstCutsceneCompleted == true.
That way, pressing E on the second NPC will do nothing until the first sequence has finished playing.
Also, to keep things more modular, consider separating each interaction into its own Blueprint or using interfaces.
All the best and kind regards,
SFDEMIR
