Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How was the inventory system in Swordburst II done?

Asked by 7 years ago

I want to to try coding it myself as I am building a RPG from scratch, but I can't seem to pinpoint the algorithm on how it is done, like how it saves how the weapon equips how the trade works, is it done in a database? etc2.

0
I think i know how to do it? WedWhackerIX -4 — 7y
0
Try adding a toolbox sword is that what your looking for? WedWhackerIX -4 — 7y
0
Here are the ingredients, looping, tables, boolvalue, and data stores. Check each boxes in the inventory system, and loop them which then sets images to each box. You of course do this by loading the data, and firing a event to client to then be stored in a parameter as a table is there. Once done, set up the loop for the boxes and check for boolvalue named 'Empty'. Do the loop, and include end. liteImpulse 47 — 7y
0
The images are set by creating a table full of asset Id's of the items, I can keep going on with my system but there is similar ways. liteImpulse 47 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

Here's an example of it loading from a Halloween project of mines:

01local itemImages = {BatBag = 1100717940, SpookyBag = 1100713485, Assassin = 1101322675, CyborgRobot = 1100642982,
02    Dino = 1100627791, DragonClaw = 1109312454, GoldenSuit = 1106505688, Korblox = 1100636628, Mummy = 1100627970,
03    Robot = 1109286574, Skeleton = 1100628054, Vampire = 1109291534, Werewolf = 1109298324, Witch = 1100634227,
04    Zombie = 1101322890, Balloon = 1124173755, Alligator = 1100538890, Doge = 1100495144, Duck = 1100540326,
05    IceDragon = 1100534252, Penguin = 1099554010, Pony = 1100536636, Pumpkin = 1100542892, RedDragon = 1100498452,
06    Bicycle = 1107566033, EvilRoped = 1100782059, GoldenRoped = 1100782148, HyperBike = 1106485232, Motorcycle = 1100781914,
07    Superbike = 1107523068, MidnightMotorcycle = 1128283829, GhostDragon = 1128283587, HalloweenFireworks = 1128284020, Tarantula = 1128283703, PumpkinBag = 1100713612,
08    PumpkinTrickorTreater = 1139816580, TheLondoner = 1139805489, SkeletonDog = 1139826749,
09}
10 
11local loadInventory = spawn(function()
12    AssignData.OnClientEvent:Connect(function(allData)
13        local dataTable = {Vehicles = allData.Vehicles, Gears = allData.Gears, Costumes = allData.Costumes,
14            Pet = allData.Pet, Bags = allData.Bags, EquippedGear = allData.gearEquipped, EquippedPet = allData.petEquipped,
15            EquippedBag = allData.bagEquipped, EquippedCostume = allData.costumeEquipped, EquippedVehicle = allData.vehicleEquipped,
View all 39 lines...
0
That is for inventory, trade is something similar to this but just more logic into it. liteImpulse 47 — 7y
Ad

Answer this question