Petrenko

  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

10 Good

About Petrenko

  • Rank
    Junior Member
...

Badges

  1. You mean like this? if inst.components.pickable and inst.components.pickable:CanBePicked() theninst.components.lootdropper:SpawnLootPrefab("cutgrass") inst.components.lootdropper:SpawnLootPrefab("seeds") end inst:Remove() This did not work.
  2. Heyho, i decompiled the .lua like in the tutorial and edited it with notepad++, i did not recompile it because SCITE did not work for me. Because of this: >luac5.1 -o "grass.luc" "grass.lua"Der Befehl "luac5.1" ist entweder falsch geschrieben oderkonnte nicht gefunden werden.>Exit code: 1 I don't even know if i installed it right, if it needs python or any addons to work with .lua... no idea. What i changed was the grass.lua prefab Have a look: inst.components.pickable:SetUp("cutgrass", "seeds", TUNING.GRASS_REGROW_TIME) It crashes when i try to harvest. My idea in the end would be to have a 1 to 5 chance of getting seeds from grass. I'd like to have this working for the farm_plot, too, which should have a 1 to 5 chance of getting fertilizer. Thanks in advance for any useful hints!
  3. Heyho, i decompiled the .lua files and played a bit with them. I deleted the traits, making tools a finite tool and also added a new drop to the grass. (It's just a proof on concept so please don't critizise what i'm doing) local dig_up = function(inst, chopper) if inst.components.pickable and inst.components.pickable:CanBePicked() then inst.components.lootdropper:SpawnLootPrefab("cutgrass") and inst.components.lootdropper:SpawnLootPrefab("seeds") end inst:Remove() After this i get the following crashlog at booting of the game LOADING LUA SUCCESS...e_Make_Steam_Package\workspace\data\scripts\main.lua:152: Prefab file doesn't return a callable chunk data/scripts/prefabs/grass.luaLUA ERROR stack traceback: =[C] in function 'assert' I did not recompile, since it did not work for me, also they told on the forum, you don't have to. Thanks in advance for any usefull hints etc. Erast P.