ITEM STORAGE SYSTEM

Posts

Pages: first prev 12 last
Adon237
if i had an allowance, i would give it to rmn
1743
author=Adon237
Yay! Score for Psy_wombats, geodude, Cherry and me! lol

EDIT: Go Cherry :3.
You have a patch for everything.
Question to Geodude - The solution you suggested.. This is only possible using a CMS, right?
Ok, I want to know if there is an easier way of doing this.

I made some pseudo-code:

Bunch of variables set to how many items the player has in their possession.
Picture/Message showing what is stored in what slot in the Storage Container.
Slot variables set to the Item ID of what is stored in that slot.

Show Choice:

DEPOSIT
- Choose item to deposit from inventory
- Select which slot to store it in the storage container

Conditional Branch to check if slot is empty?
If slot is empty, proceed to deposit
Select item from inventory(Done by show choice/picture, I don't know how I'm going to do this I can use and display pictures I just don't know how I'm going to select the item)
- Remove item from inventory
- Slot set to Item ID.

If slot is not empty
I have two choices here:
- Leave it as it is
- Allow the items to be swapped with what is stored in the slot with what I want swapped from my inventory

WITHDRAW
Select which slot to withdraw from
If inventory is full, leave item in storage.

If inventory is not full
Add item to inventory
Set slot variable to 0, indicating it’s now empty.

I don't see where pointers should be used?


It's needed for the routines where you want to determine how many of an item the player has in the inventory. You'd normally need something like this:

<> Change Variable applesHeld == Amount of item Apple
<> Change Variable orangesHeld == Amount of item Orange
<> Change Variable ammoHeld == Amount of item Ammo

...etc

You'd also need it for withdrawing items from inventory:

<> Condition Branch if Variable typeToWithdraw == 1
....<> Add Item Apple
: End
<> Condition Branch if Variable typeToWithdraw == 2
....<> Add Item Orange
: End

...etc

You'd rather just make something like a loop and iterate over all the items in the game. Testing them one by one is dumb. Not to mention things like getting the item names and all that other stuff. Bottom line: use Cherry's patch. It'll make life so much easier.
author=psy_wombats
You'd rather just make something like a loop and iterate over all the items in the game. Testing them one by one is dumb. Not to mention things like getting the item names and all that other stuff. Bottom line: use Cherry's patch. It'll make life so much easier.

Sorry I don't fully understand what you mean exactly?

EDIT: Understand now, it's a lot more tedious than I thought but I think it will be worth it.
Pages: first prev 12 last