How to find out which item was launched in the rocket
How to find out which item was launched in the rocket
How to find out which item was launched in the rocket in event on_rocket_launched?
My native language is russian. Sorry if my messages are difficult to read.
Re: How to find out which item was launched in the rocket
You can check the rocket inventory:WIZ4 wrote:How to find out which item was launched in the rocket in event on_rocket_launched?
Code: Select all
function on_rocket_launch(event)
local rocket = event.rocket
local inventory = rocket.get_inventory(1)
local contents = inventory.get_contents()
game.print(serpent.block(contents))
end
Re: How to find out which item was launched in the rocket
Thanks!
My native language is russian. Sorry if my messages are difficult to read.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: How to find out which item was launched in the rocket
Code: Select all
local inventory = rocket.get_inventory(1)