Basic Faction System?
Hi there peeps!
Not quite sure how to go about this one, so I thought to ask here!
I'm making a game with a range of factions. I planned that each character (including the player) has a relationship variable (likely just an integer) with each faction. If low, gangs are hostile, if high, allies, etc etc.
What I'd like to know is how to make each faction member make checks on all the characters they see (via pawnsensing)? How do you make the relation variable able to be read the same for each person as a universally recognized value rather than having to cast to each individual character for their own unique version of that variable? Would it involve getting actors from class? I'm kinda uncertain about how to go about this XD
Thanks in advance!
asked Jul 12 '19 at 12:29 PM in Blueprint Scripting
Ok, I've found the answer myself. I did download the faction plugin, but have not bothered using it, at least not yet, as I'm using more specific relations than just Freindly, Neutral and Hostile.
What I did was create a new blueprint class, which I called 'Respec'. This component contains variables for relations with all factions. Every character will have this component and whichever character with pawn sensing sees that character will check that component to see what they are supposed to think of them.
Example below shows how to check this component using pawn sensing. The character using this is part of a thing called the Iron Sigil and is checking how much it's faction respects that person.
answered Jul 14 '19 at 12:52 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here