Hi all,
Want to make it so char can steal from shops like in Skyrim. I don’t always want pawn sensing ai to be aggressive only if character steals. I think I could create a Boolean isStealing then activate and deactivate as stealing happens, then when ai sees character they constantly checking for that boolean. That seems kinda overkill. Any thoughts on sending a stealing event or something would be appreciated. Thanks!
Hello, how about this…
If you are seen doing nothing wrong, then nothing will happen, but send a boolean to your character “I am being watched”, and save that AI reference.
If you are stealing, then communicate from the character and get that AI reference if you are being watched, and let that AI know that you are stealing.
I just learned the sphere trace by channel the other day that gives you the unique abiity to essentially set the radius of the sphere. This lets you adjust the width of a trace essentially setting a vision width for the actor. You could also create a variable to set the length of the trace. This would give your ai the ability to detect the player at a certain range and only if the player falls within the defined width. Basically it would be a similar effect to a vision cone like a mechanic in Splinter Cell.
Both great suggestions. Thanks. I could send an observed bool as I’m seen and act off that. Sphere trace could be cool, I wonder if I could make that large and apply to character during stealing only, then as it interacts with AI in range they check if they can see character. Using sphere trace almost like sending a custom event to all nearby AI.
I was reading last night and if I understand correctly I can cast to all the AI class also so in theory all AI would get the stealing event and only ones who can currently see the player would act on the information.
Thanks to all!