Page 1 of 1

Runtime access to spawner protection flag

Posted: Fri Oct 17, 2025 11:18 am
by Techjar
Spawners have an internal flag that controls whether it's protected from automated shooting by turrets, but unless I missed something, the only way I've found to set this flag is through a create entity trigger effect. There's no way to read to write the flag on an existing spawner entity. This could be a useful thing to have access to, like if a mod wants to do some custom targeting code and have it properly ignore these spawners, or if someone wanted to just change the protection status through a console command or otherwise.

Re: Runtime access to spawner protection flag

Posted: Wed Oct 22, 2025 4:15 pm
by Rseding91
I've added LuaEntity::protected read/write for 2.1.