Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Spocker

#1
Hi there!

I am trying to set an inventory as a list, where we could see the object and its definition next to one another (RPG like). I'm not at this step though, as I already have some difficulty getting rid of the slot inventory.



In the picture, you can see that items obviously appears in the Inv Window where I hastily drew red crosses. But I would like a system where you have the object's picture (where are blue circles) and the object's description (where are blue lines) as a list.

1.My first idea was to manually set the item coordinates in the Inv Window, as I don't mind to:
-Try to understand how to set a variable for each item that the player takes in his inventory,
-Do something like IF this is the 4th item, then let the picture go to this (x,y) coordinates, IF this is the 5th, go there, etc.

However, I can't seem to find any way to get to the object coordinates when it is drawn in the inventory. I wanted to have slots under slots, and not next to each other. My scripting skills being almost inexistant, reading (several times) the Manuel on GUI/InvWindow/Inventory Items functions and properties was not enough.

2.The second idea I had was to use a ListBox instead of an Inv Window. However, I'm really not familiar with it. I naively tried this (where "1" is the Item ID) :

Code: ags
function oCupofTea_Interact()
{
    oITEM.Visible = false;
    ListBox.AddItem(1);
}

But it simply doesn't work and return this very enigmatic error: "Must have an instance of the struct to access a non-static member".
Unfortunately, I don't understand a word of it. My plan to conquer the world seems to end here! ^^

Thank you for any help or workaround. I didn't find any module that seems to do the trick!
#2
Hi there!

I'm a total beginner but I have a question that needs to be solve at the beginning of a game, so it's perfect.
For my Rooms, I use background images of 1600*900 and the same resolution in the General Settings. However, I have one image background that I use differently, not as a "paysage" but as a "portrait". It's 900*1600.

Is it possible via a script command (beginner here) to temporarily change the resolution of the screen (900*1600?), and set it back to normal (1600*900) after that?
Should I put this script in the "First Time enters room" Event?

How would you recommend that I try that?

Thank you for your help!
SMF spam blocked by CleanTalk