Report with selected witnesses

Announcements, support questions, and discussion for Love/Hate.
Post Reply
User avatar
ds2497
Posts: 55
Joined: Wed Jun 14, 2023 2:13 am

Report with selected witnesses

Post by ds2497 »

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!
User avatar
Tony Li
Posts: 22085
Joined: Thu Jul 18, 2013 1:27 pm

Re: Report with selected witnesses

Post by Tony Li »

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:

canSeeAdvanced.png
canSeeAdvanced.png (225.88 KiB) Viewed 1114 times

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.
Post Reply