MXXIV Posted March 3, 2016 Share Posted March 3, 2016 Ideal case: Spawn items in player's inventory. If he cannot carry the items, spawn them on ground. I tried to search for some existing usage, but I found nothing. Specifically, I looked into tree chopping (media\lua\client\TimedActions\ISChopTreeAction.lua). It doesn't handle the log spawning because the tree "dies" independently of chopping and spawns items. And it seems that this is done in java. Link to comment Share on other sites More sharing options...
RoboMat Posted March 3, 2016 Share Posted March 3, 2016 player:getCurrentSquare():AddWorldInventoryItem(item, 0.0, 0.0, 0.0); MXXIV 1 Link to comment Share on other sites More sharing options...
ZombiesLoveBrainiacs Posted March 3, 2016 Share Posted March 3, 2016 or to add a TreeBranch directly to inventory: player:getInventory():AddItem("Base.TreeBranch"); MXXIV 1 Link to comment Share on other sites More sharing options...
MXXIV Posted March 3, 2016 Author Share Posted March 3, 2016 I'll combine both of the above, thank you guys Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now