I want to make a feature that auto using raw-fish if character's health is low.
for raw-fish, i can use LuaItemStack::count to decrease the raw-fish in inventory, and heal the character by LuaEntity::damage.
But If i want to use grenade by script, it can't implement in the same way.
How to use item for character by script?
Re: How to use item for character by script?
Find item prototype, get projectile, place projectile, delete one item if successful.
https://lua-api.factorio.com/latest/Lua ... otype.html
I think it must be https://lua-api.factorio.com/latest/Lua ... ace_result
https://lua-api.factorio.com/latest/Lua ... otype.html
I think it must be https://lua-api.factorio.com/latest/Lua ... ace_result
Re: How to use item for character by script?
Something similar is implemented in EatOrDie mod https://mods.factorio.com/mod/EatOrDie by dankirpan how was built up on MoSurvival by ludsoe
And I trying understand how to add to FI mod
And I trying understand how to add to FI mod
