Page 1 of 1

Drop items on ground

Posted: Tue Sep 29, 2015 1:39 pm
by matjojo
I am working on EE2.
I am at this scenario:
the user has the whole energy condenser(it's a container) full as well as his inventory and he has an item in hand(different as the item I need to add).
so, I want to drop the item on the ground.

I looked around on the wiki in the game, player, and the inventory sections. also just a general search, but found nothing.

how do I do this?

Re: Drop items on ground

Posted: Tue Sep 29, 2015 3:04 pm
by Outsider
You can use surface.spill_item_stack it takes an item stack and a position as parameters.

https://forums.factorio.com/wiki/inde ... item_stack

Re: Drop items on ground

Posted: Tue Sep 29, 2015 3:44 pm
by TimmPure
I'm not sure I understand the question correctly, but dropping an item on the floor from your cursor is Z by default. Is that what you're looking for?

Re: Drop items on ground

Posted: Tue Sep 29, 2015 5:22 pm
by matjojo
TimmPure wrote:I'm not sure I understand the question correctly, but dropping an item on the floor from your cursor is Z by default. Is that what you're looking for?
no, I was talking about a way to drop items from a mod, like in code.