SOLVED: scroll inv window to see replaced inventory items.

Started by barefoot, Tue 10/05/2011 09:11:59

Previous topic - Next topic

barefoot

Hi

My player changes room and has his inventory lost and new ones replaced for that room.

I have done all the losing inventory and adding the new one's and they are indeed there.

Problem: only the last inventory item shows in inventory window. You need to scroll UP (north) inventory window to see other inventory items.

All Inventory items are given their ID when adding.

Obviously i want the inventory items to fill the Inv window replacing the previous once.

I can't seem to solve this issue at the moment. Can you help?

cheers

barefoot

I May Not Be Perfect but I Have A Big Heart ..

Gudforby

If the only problem is that the player have to scroll up the inventory window manually, couldn't you just add the InvWindow.ScrollUp command in the script after the inventory items are replaced?

barefoot

Hi

Thanks for your post Gudforby

invCustomInv.ScrollUp(); works but as the manual states:

Quote
   will scroll the invMain inv window up one row.

I have vertical inventory window with 1 item per row so I need something to make it show more items (I have 7 inv items but obviously only so many in window due to height and width. maybe 5?)

barefoot
I May Not Be Perfect but I Have A Big Heart ..

barefoot

Hi

This may be off-hand but it works and now shows many items in inventory window:

Code: ags

         invCustomInv.ScrollUp();
	invCustomInv.ScrollUp();
	invCustomInv.ScrollUp();
	invCustomInv.ScrollUp();
	invCustomInv.ScrollUp();
        invCustomInv.ScrollUp();


barefoot



I May Not Be Perfect but I Have A Big Heart ..

Khris

How about this instead:

Code: ags
  invCustomInv.TopItem = 0;

barefoot

Hi Khris

I'll give that a try.. it's less to add..

Thanks

barefoot
I May Not Be Perfect but I Have A Big Heart ..

SMF spam blocked by CleanTalk