Get connected pipes (fluidboxes)?

Place to get help with not working mods / modding interface.
savi
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat May 21, 2016 9:09 pm
Contact:

Get connected pipes (fluidboxes)?

Post by savi »

Hey,

I have a entity with a fluidbox and access it with fluidbox[1], but I want to access the fluidbox attached to it, how can I do that?

Image

Thanks in advance

Savi
savi
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat May 21, 2016 9:09 pm
Contact:

Re: Get connected pipes (fluidboxes)?

Post by savi »

I guess it's not the fact that no one wants to share the awesome solution with me but more the fact that it's not possible right now?
keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: Get connected pipes (fluidboxes)?

Post by keyboardhack »

I intended to answer this sooner but forgot.

It's possible. I assume you want to get the fluid box of the pipe the arrow is pointing at from the machines fluid box
If the machine only has 1 fluidbox then you can do it like this.

Code: Select all

machine.neighbours[1].fluidbox[1]
Where machine is the entity of the machine.
You can read more about the neighbours API here
Waste of bytes : P
Post Reply

Return to “Modding help”