If I wanted to create some technology that, when researched, changed the cooldown time for the laser turrets, how would I go about doing that?
I think I would create a set of technologies that had an empty object for the effect, but would do something on the "on_research_finished" event? Can I somehow modify the cooldown property of all turrets that a player has placed/places? Do I have to create new entities and replace all existing with the new one and replace all newly placed ones with the new one as they place them?
Updating a property after research finishes
-
- Fast Inserter
- Posts: 109
- Joined: Wed Aug 31, 2016 3:35 am
- Contact:
-
- Fast Inserter
- Posts: 109
- Joined: Wed Aug 31, 2016 3:35 am
- Contact:
Re: Updating a property after research finishes
unless anyone else has some magical knowledge, I will assume I will have to replace every instance of the placed turret with a slightly modified entity. A rather poor design.
Re: Updating a property after research finishes
Yes, you need to replace entities unless your property is attached to LuaForce.
Laser turret cooldown seems like a good addition to LuaForce, maybe you can make a modding interface request.
Laser turret cooldown seems like a good addition to LuaForce, maybe you can make a modding interface request.