R2Northstar / NorthstarDocs

Guides and tutorials on how to mod using Northstar
https://docs.northstar.tf/
MIT License
0 stars 2 forks source link

Document how to get AI to respect prop collisions #32

Open GeckoEidechse opened 1 year ago

GeckoEidechse commented 1 year ago

Mentioned by @Zanieon in contributor channel on Northstar Discord:

Public utility, if you want the AI of the game to respect the collision of a prop, spawn it as a prop_script instead of dynamic and set these functions:

ToggleNPCPathsForEntity( prop, false )
prop.SetAIObstacle( true )
prop.SetScriptPropFlags( SPF_DISABLE_CAN_BE_MELEED | SPF_BLOCKS_AI_NAVIGATION )

used this shit to finally get rid of AI clipping into the Harvester and Titans trying to melee it

https://discord.com/channels/920776187884732556/936105663942246410/1136656955486781450