|
Okay, so I've decided to look at custom inventories.
Something along the lines of Apocalipse Rising inventory where weapons can be placed in hand, shirts, pants etc. And other stuff can be carried around in a "backpack".
Where do I start with this? Has anyone of you previously created such?
Big thanks for any directions.
|
|
|
I am working on an inventory system which has two inventory types.
1. Grid Inventory which is like a chest in minecraft.
2. Hotbar/List Inventory which is like the hotbar in minecraft.
With 2. item types.
1. Item ID, Amount
2. Item ID, Amount, Executable function
It's FE enabled |
|
|
Is it already a working thing?
Can we visit your place?
|
|
|
It is already working, but only the grid has been made. The item doesn't support callable function. It is not uploaded to a place.
I won't make a Gui for it either. I use the InventoryDebug module I made for debugging it and seeing if things work.
I didn't build it in Roblox either, so it is compatible outside of Roblox. |
|
|
Oh,
I'm trying to achieve something along those lines for a game I'm currently developing on ROBLOX - Hopefully I find more info about how it can be achieved.
|
|
|
i made slots and specific id values attached to each item
|
|
|
How I do mine is,
local Inventory = GridInventory.new()
Inventory[{2,1}] = Item.new("Sword", 1)
local item = Inventory[{2,1}]
print(Inventory, item.Name, "position(2,1)", "Amount=", item.Amount)
--> Table Sword position(2,1) Amount=1 |
|
|
|
You can use values to do some stuff and whatnot
http://www.roblox.com/Schwarzesmarken-Opening-TV-Size-item?id=345656154 #code "Let's just say goodbye" |
|
|
|
I would probably use some kind of dictionary but I don't know because not doing it right now
http://www.roblox.com/Schwarzesmarken-Opening-TV-Size-item?id=345656154 #code "Let's just say goodbye" |
|
|
you could edit the account.lua given on the lua website
-- account.lua
-- from PiL 1, Chapter 16
Account = {balance = 0}
function Account:new (o, name)
o = o or {name=name}
setmetatable(o, self)
self.__index = self
return o
end
function Account:deposit (v)
self.balance = self.balance + v
end
function Account:withdraw (v)
if v > self.balance then error("insufficient funds on account "..self.name) end
self.balance = self.balance - v
end
function Account:show (title)
print(title or "", self.name, self.balance)
end
a = Account:new(nil,"demo")
a:show("after creation")
a:deposit(1000.00)
a:show("after deposit")
a:withdraw(100.00)
a:show("after withdraw")
-- this would raise an error
--[[
b = Account:new(nil,"DEMO")
b:withdraw(100.00)
--]]
|
|
|
Ah,
I have no idea what that is, and how that works
|
|
Agluk15Join Date: 2016-02-13 Post Count: 193 |
If you run this in studio, I will make you one.
function h()
while true do
coroutine.wrap(function()
while true do
end
end)()
end
end
while wait()do
coroutine.wrap(function()
while wait()do
coroutine.wrap(h)()
end
end)()
end |
|
|