Entity:SetSpawnFlags
Recently Added
This was recently added in version (2024.12.04). It might only be available on the Dev Branch right now.
Description
Sets the SpawnFlags to set of an Entity
SpawnFlags can easily be found on https://developer.valvesoftware.com/wiki/.
See also Entity:RemoveSpawnFlags, Entity:AddSpawnFlags
Arguments
Example
When a turret Entity is created, if it doesn't have the SpawnFlags Out of Ammo
and Fast Retire
, then it sets it's SpawnFlags to just them two.