Placing items on the ground

Place to get help with not working mods / modding interface.
Post Reply
JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Placing items on the ground

Post by JamesOFarrell »

Is it possible to place items on the ground? I want to overflow from the players inventory if it is full. I thought i read it in the wiki but I have searched with no luck.

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Placing items on the ground

Post by ficolas »

Yes, you need to create a "item-on-ground" entity:

Code: Select all

game.createentity{name="item-on-ground", position={x,y}, stack={name="whatever item you want to place", count=amount}

JamesOFarrell
Filter Inserter
Filter Inserter
Posts: 402
Joined: Fri May 23, 2014 8:54 am
Contact:

Re: Placing items on the ground

Post by JamesOFarrell »

Thanks for that, that's exactly what i needed. I also now know where I saw how to do it originally, in the code for your mod, which I used to learn the basics of the modding API. My wagons mod even has a resources folder because f-mod does.... so thanks for that also

EDIT: This if your fault... :D

Post Reply

Return to “Modding help”