Page 1 of 1

charging the player a variable number of items

Posted: Wed Jul 11, 2018 5:56 pm
by CyberWizard2261
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?

Re: charging the player a variable number of items

Posted: Wed Jul 11, 2018 7:57 pm
by eradicator
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.