What?
The ability to change what entity a combat robot is following.
Why?
Because after staring at the doc for half an hour the only method i can see is to recreate the entire robot using surface.create_entity{target=NewOwnerLuaEntity}. Which is wasteful at best and breaks other mods at worst. It also produces a slight optical "bumb" because the new robots start at a different animation frame.
What for?
To smoothly change the appearanc of the player avatar by creating a new character and copying everything.
LuaEntity.target= [(R?)/W] for Combat Robots
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
LuaEntity.target= [(R?)/W] for Combat Robots
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: LuaEntity.target= [(R?)/W] for Combat Robots
Added for the next release.
If you want to get ahold of me I'm almost always on Discord.
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: LuaEntity.target= [(R?)/W] for Combat Robots
Thanks! Is it gonna be [R/W] or just [W]?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: LuaEntity.target= [(R?)/W] for Combat Robots
RW
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: LuaEntity.target= [(R?)/W] for Combat Robots
Perfect.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.