Garry's Mod

Garry's Mod

191 ratings
Desired's AI Standoff Creator
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Realism
File Size
Posted
Updated
6.936 KB
24 Oct, 2020 @ 4:26am
25 Oct, 2020 @ 4:14am
3 Change Notes ( view )

Subscribe to download
Desired's AI Standoff Creator

In 1 collection by desivistia
Desired's AI Addons
7 items
Description
A simple STool that allows you to create standoff situations for NPCs using the Source engine's ai_goal_standoff and ai_battle_line entities. Standoffs allow NPCs involved to use cover points while advancing to their target and, if one is available, to stay behind a battle line. Standoffs offer various levels of aggression which determine more of the tactics an NPC will employ, predominantly featuring prolonged sustained fire and more risk taking.

Left-click to create a battle line entity. Location is based on where you point at, orientation is based on what direction you're looking into. From what I've tested, aim outwards into where you want the region of the standoff to be (affected NPCs will stay behind their battle lines). Right-click to create a standoff entity. Reload to clear the entities.

For more detailed instructions on this somewhat complicated addon:
Aggressiveness: Aggressiveness of the NPCs affected by ai_goal_standoff. 0 is very low aggression and 4 is very high aggression (read https://developer.valvesoftware.com/wiki/Ai_goal_standoff ).

Battle Line Name: The name of the battle line entity. From what it seems like, there's no need to create unique names for each you spawn.

Battle Line Actor/Squad: The name of the entities the battle line will apply to. Inputting an actor name means you need to have NPCs with the given name (recommended is to have something like 'combine_*', where * is a number after assigning a targetname to an NPC - use console commands or my name assigner addon to do so). Inputting a squad name means you need to have NPCs in the squad (in which you'll need something to assign NPCs to squads - use an addon which has NPCs assigned to squads by default and use that squad name or use a squad assigner addon like my own).

Standoff Name: The name of the standoff entity. Like the battle line name, from what it seems like, there's no need to create unique names for each you spawn.

Standoff Target Name/Class: The name, or class, of the entities the standoff will apply to. Inputting a name means you need to have NPCs with the given name (highly recommended to have something like 'combine_*', where * is a number after assigning a targetname to an NPC - use console commands or my name assigner addon to do so). Inputting a classname means all NPCs belonging to the class will listen to the standoff.

Search Type: How the standoff entity searches for its NPCs to affect. 'Entity' will search for NPCs with given name as stated by Standoff Target Name/Class. 'Classname' will search for NPCs with given classname as stated by Standoff Target Name/Class.

Note: This is highly experimental for me, and not even I know how it all exactly works. Do let me know if there's any errors with this - it'd be much appreciated!
Popular Discussions View All (1)
4
6 Nov, 2020 @ 6:36am
Question
Soldier
33 Comments
xcaliber 1 Apr @ 2:35pm 
small suggestion for if you update this, is there a way for you click NPCs it makes a group and clicking the world makes a line? and then pressing right click would deselect the NPCs and R despawns lines? this mod is very cool thank you for posting :headcrab:
/ᐠ-˕-マ「来自重庆的」 30 Oct, 2024 @ 10:02pm 
this is cool but a bit too complicated
Petra 14 Mar, 2024 @ 3:23pm 
take your time, i'd rather you having a life than me having an addon
desivistia  [author] 27 Feb, 2024 @ 11:57pm 
eventually i will (and should). kinda neglected this for awhile. also probably worth mentioning i never added multiplayer support, which might have screwed some people over. when i get time i'll remake the addons
Petra 27 Feb, 2024 @ 2:30pm 
could you please make a simplified version
CsakEgySuttyó 22 Jan, 2024 @ 10:54am 
"Excuse me, friend, can you check the addons? I don't know if after so much use or the game updates in all this time, it seems that even though it doesn't show any error, the NPCs don't behave as they should."
robertcox 15 Jan, 2024 @ 6:33pm 
how do i rename individual NPC's? i know the squad setting tool but i dont know what tool i need to name the individuals
Agent51 18 Oct, 2023 @ 12:18pm 
what does the battleline do, and what does the standoff entity do, I'd like to know. I believe the standoff entity makes the npc maybe take cover, but what about the battleline?
Butter Fliege 26 Oct, 2022 @ 12:50am 
how does it work.
Crumbowb 6 Jun, 2022 @ 9:23am 
i dosen't work