Sign in to follow this  
Czeraphine

Help for a mod that drops items in place

Recommended Posts

Czeraphine    139

Hello there! I made a small function that drops in place whatever item was held at the time. It would be useful for organising your base a little bit and not making it look like such a clutter (personally, I kind of just drop things approximately where I want them, and it looks like a mess over time).

I was wondering how I can implement this so that if I decided to drop a stack, it wouldn't drop a whole stack but individual items from that stack much like ctrl + right click drop. Below is the code: 

local function Drop()

if GLOBAL.ThePlayer.replica.inventory:GetActiveItem() then
        GLOBAL.ThePlayer.replica.inventory:DropItemFromInvTile(GLOBAL.ThePlayer.replica.inventory:GetActiveItem(), false)
    end
end

GLOBAL.TheInput:AddKeyDownHandler(KEY_#, Drop)

Edited by Czeraphine

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this