Hi there,
Currently, I have a global faction manager in my game, but due to a requirement change, I want only the person involved in an event to experience an affinity change. I was wondering if I could make deeds judged only by the person affected or by selected witnesses.
For instance, if the player (an elf) steals from a Human named Mary, Mary will have a negative affinity towards the player, but her husband Bob (who loves Mary but is not involved in the event) won't. Additionally, I want Mary's parent faction, Human, to judge this event and change their affinity towards the player. This way, only Mary and the Human faction will be upset about the theft, while other factions such as Goblins will remain unaffected.
Do you have any hints on how to achieve this?
Thanks!
Report with selected witnesses
Re: Report with selected witnesses
Hi,
If you mark a deed as "Requires Sight," potential witnesses will check if they can "see" the actor. The default check performs a raycast from the witness's Eyes transform position to the actor. If the raycast is blocked by a wall or something, the witness can't see the deed, so it won't know about it.
Love/Hate includes a more sophisticated replacement. If you add a CanSeeAdvanced script to the witness, this script will assign itself to the faction member's CanSee delegate and perform a more advanced vision check using multiple configurable fields of vision:
In your case, you can instead add your own custom script that assigns itself to the CanSee delegate to return true only if the faction member is in your list of faction members that are allowed to witness the deed.
If you mark a deed as "Requires Sight," potential witnesses will check if they can "see" the actor. The default check performs a raycast from the witness's Eyes transform position to the actor. If the raycast is blocked by a wall or something, the witness can't see the deed, so it won't know about it.
Love/Hate includes a more sophisticated replacement. If you add a CanSeeAdvanced script to the witness, this script will assign itself to the faction member's CanSee delegate and perform a more advanced vision check using multiple configurable fields of vision:
In your case, you can instead add your own custom script that assigns itself to the CanSee delegate to return true only if the faction member is in your list of faction members that are allowed to witness the deed.