I have an entity and I want it to charge the player a variable number of items when it is built from a blueprint
I know I can remove items directly from the player's inventory or from the player's logistics chests but I don't feel this is the right way to do it
I also tried to set " ghost_entity.item_requests " and the construction robots do take the requested items to the entity but they bring them back to in few seconds
Is it possible to consume or destroy the items delivered by the robots?
charging the player a variable number of items
-
- Inserter
- Posts: 33
- Joined: Tue Jun 26, 2018 11:01 am
- Contact:
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: charging the player a variable number of items
Script in several "fake" ghosts at the same position. Listen for on_built. When all of the fakes are built revive the real one. Ofc this requires that the real one can't be built. Or that you deactivate the real one if it's revived before the fake ones are complete.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.