So I am in the process of trying to define dialogue interaction between NPC’s and I am a little confused about how to handle this correctly without reproducing oodles of blueprints unnecessarily.
I am using a line trace from my playable character to check if the player is interacting with NPC0 via a cast to NPC0, if cast failed it checks for NPC1.etc. All of these casts do the same thing afterwards, it fires the ‘Talking’ custom event from the corresponding NPC blueprint, brings up a generic dialogue hud and disables movement. Can this be streamlined somehow?
Here is the resulting call from NPC0 that defines the idle flipbook to use so the NPC turns to the player.
I am wondering if an Actor Component blueprint is the way to go here, cast to that then somehow call which NPC flipbook, datatable name/dialogue.etc to use. but I don’t fully understand the ins and outs of how or what I should set up my paper2d NPC’s as. They are currently Paper Flipbook Actors. Should they be classed otherwise?
I hope this is somewhat clear… Ideally I would like to have a base NPC template that I can reuse with every NPC that basically says, if interacted with via the line trace, call the appropriate flipbook for that NPC so it looks at the player when interacting.
Long story short, I am very confused how to handle NPC’s efficiently that all act mostly the same, but have different dialogue datatables and spritesheets…
God, I am confused and a bit of a nub