Page 1 of 1

Allow "unit" type to teleport cross-surface

Posted: Thu Jun 13, 2024 3:42 am
by heyqule
https://lua-api.factorio.com/latest/cla ... l#teleport

Only players, cars, and spidertrons can be teleported cross-surface. May you add "unit" type support?

I workaround it by destroying existing unit and recreating with the unit with same health on the other surface. Doing so have other overhead calls for the army count calculations. It would be nice to do that with one teleport() call.

Re: Allow "unit" type to teleport cross-surface

Posted: Thu Jun 13, 2024 5:44 am
by curiosity
heyqule wrote: Thu Jun 13, 2024 3:42 am I workaround it by destroying existing unit and recreating with the unit with same health on the other surface. Doing so have other overhead calls for the army count calculations. It would be nice to do that with one teleport() call.
You should be able to clone it. This still has overhead, of course, but avoids numerous other issues.