Page 1 of 1

Attach tag to entity via scripting

Posted: Mon Aug 24, 2020 10:03 pm
by x2605
Exclusive "tag" for entity is attachable from Map Editor(/editor).

And accessible via

game.get_entity_by_tag(tag)
https://lua-api.factorio.com/latest/Lua ... ity_by_tag

But I can't find any way to "write tag" via script.
If it's not exist, add it please.
If it's exist, let me know.

Re: Attach tag to entity via scripting

Posted: Tue Aug 25, 2020 10:42 pm
by Rseding91
It specifically doesn't exist because it's O(N) cost to add and or get those tags. They are not meant to be used heavily and or commonly outside of scenarios.