Page 1 of 1

Sending (fake) cargo-pod by script

Posted: Sat Feb 08, 2025 4:55 pm
by y.petremann
I have two cargo pod owned by the same force "merchants", one is on nauvis (storage.merchants.nauvis.surface.player), the other is in orbit of nauvis (storage.merchants.nauvis.orbit)

I would like to launch a cargo-pod from orbit to surface with animations and everything

For now I tried :

Code: Select all

local pod=storage.market.nauvis.orbit.create_cargo_pod()
pod.cargo_pod_destination={type=defines.cargo_destination.surface, surface="nauvis" }
The cargo pod instantly disapear,
I need the animation and optionnaly to trigger something when the cargo arrive at destination (I don't mind to have a real inventory transfer)

Re: Sending (fake) cargo-pod by script

Posted: Mon Feb 10, 2025 11:15 pm
by s6x
Is storage.market.nauvis.orbit a space platform hub?

I typed the following while in Nauvis orbit:

Code: Select all

/c HUB = game.player.surface.find_entities_filtered({name="space-platform-hub"}) POD = HUB[1].create_cargo_pod() game.print(POD) POD.cargo_pod_destination = {type=defines.cargo_destination.surface, surface="nauvis"}
A cargo pod popped out (and its information printed to the console) and landed on the planet as expected.

Edit: Just to confirm that it wasn't doing some default thing, I changed "nauvis" to "fulgora" and the pod did indeed land on Fulgora directly from Nauvis orbit. :mrgreen: