Product Chat (Early Access) / Contextually sensitive NPC allegiance?

Author
Message
ThomasG81
2
Years of Service
User Offline
Joined: 27th Mar 2022
Location:
Posted: 8th Apr 2022 23:12
I have an idea for a FPS game that has espionage/spy elements (think the KGB infiltration level in CoD Cold War you get the idea).
Is there a way to have hostile behaviour in hostile NPC disabled until the player controlled character has their cover blown and is seen by them engaging in provocative behaviour?
PM
Toxicclowd
6
Years of Service
User Offline
Joined: 9th Jun 2018
Location:
Posted: 9th Apr 2022 05:55
I was poking around the visual logic editor the other day before work and noticed that there are commands to set an AI to Ally or Enemy within the script, so I'm sure this is possible with some tinkering. Along the same lines you could probably do something like picking up an enemy uniform to make enemies think you're one of them or have your cover blown if you kill an enemy or steal an object, etc. Definitely a good idea, I had intended to play more with the editor after work the other day but got called home to take my son to the hospital and haven't had a chance to get back to it, let me know if you happen to play around and figure anything out.
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 9th Apr 2022 08:22
Your kind of halfway there already
If you set a character to neutral they will ignore you until you shoot at them.
Then they attack you.
No one ever really leaves.
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 9th Apr 2022 14:48
If you are talking about getting this via button click, so, you'll have to post a request on GitHub.
However, you can get it via LUA.

List all the possible "provocative behaviors" the player might have than can cause the NPCs to pass, from neutral to enemy behaviors.
Then ask yourself how many behaviors should the player takes, in order to pass to enemy behavior.
List those behaviors inside an array/table/list or whatever you want.
Initialize all of them to false, just became true when the player reaches that specific behavior, when 2 or 3 behaviors = true, then the Fairplay has finished, lol
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
ThomasG81
2
Years of Service
User Offline
Joined: 27th Mar 2022
Location:
Posted: 10th Apr 2022 19:40
I am also in need of a 'team system'
For example i might have scenarios where i want teams of NPCs to attack each other, but not necessarily try and hit the player.
PM

Login to post a reply

Server time is: 2024-12-22 05:11:04
Your offset time is: 2024-12-22 05:11:04