Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

Help With Rpg Inventory

Archive: 4 posts


Hello fellow sackfolk . I'm currently needing some help with an inventory for my rpg level. I'm not talking about design i am talking about logic. I think its fair to say that im am pretty good at logic but this one part really has me stumped. I am trying to make it so that in my rpg if i pick up more than one of an item for example i have 5 of a particular item that i can be able to use that item and still have 4 left, and maybe if i pick up the same item again i could have 5 of it. It's just basic adding and subtracting but I'm very confused. Please all you Advanced Logic People help me out. You can either describe it to me here but I'd like it if you showed me in game My psn is TwinzTCL Either or is fine just please help. 2012-05-21 03:58:00

Author:
Unknown User


this is extremely simple (that is, if i understood you correctly)
all you need is a selector, a directional combiner, and a specified activation of add and subtract (usually a tag sensor or an internal device)

BOOM! done.

(If it didn't work, tell me what you did and I'll figure it out)
2012-05-21 21:10:00

Author:
a_mailbox
Posts: 416


Yes. Connect the "use item" button to the combiner's minus and an impact sensor to the combiners plus. Connect the selector's top two outputs to and AND gate, and connect the 2nd output of the selector to it's 1st input. This will prevent it from looping when you reach -1 object (the AND gate is now the "0 item" and the first output under this gate, the selector's 3rd output, is the "you have 1 item"). Do the same with the bottom of the selector (the two bottom outputs go in an AND gate and the bottom output goes in the second-to-bottom input). Now to verify if you have enough items to spend any, you must check if the player pressed the "spend item" key AND does NOT have 0 item. You'll need to invert the signal of the top AND gate (or put a NOT gate) and then run it through another AND gate with the "spend item" button. You could make a similar test to make sure the player can only grab an item when he doesn't have reached max amount, else grabbing a potion when at max capacity will just waste that potion. If you counted well, you need 3 more outputs on the selector than the number of potions. Next you can run these outputs to an hologram display or to a 7-segment converting logic. I won't explain that, but it works with NOR gates (which segment is off with that number?).2012-05-21 21:36:00

Author:
Unknown User


My problem has been resolved thank you guys2012-05-21 22:54:00

Author:
Unknown User


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.