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

Messages - Spocker

#1
Well,
Thank you sincerely, the first idea you gave (about playing with the width/height of the Inv Window) made me rethink a bit the display of my inventory. It's not pixel perfect yet, but it's going. Here with a random example.



As for your explanation on strings, I litterally just understood that it really meant... "STRINGS". I thought it was a concept or a name, like variable or integrer. Not the actual "guillemets". ^^'

Now I just need to find in the Dialog Manual how to do line breaks inside the ListBox' strings, and how NOT to display any background in the ListBox (or a transparent one), and the inventory will actually look nicer.
Strangely I didn't find any explicit list of Dialog options, such as changing the color/size/type of fonts inside a speech. Will look again!

#2
Thanks for the thorough answer. The last option seems quite complicated indeed, I may try it though.

But first, when I try this as you corrected:
Code: ags
ListBoxInventory.AddItem(1);
I get the error: "Type mismatch: cannot convert 'int' to 'const string'". Would you be able to help?
#3
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!
#4
Hi there!

Thank you for answering again, it was quick and efficient. I had to reread the last bit because it's my first time scripting, but it ended up like this:

Code: ags
function room_RepExec()
{
    if (mouse.x <= 480) {
      mouse.Visible = false;
    }
    else if (mouse.x >= 1101) {
      mouse.Visible = false;
    }
    else {
      mouse.Visible = true;
    }
}

I didn't know how to do : IF / OR / ELSE, I just found out how to say IF / ELSE IF / ELSE.
But it works!

Here goes the result, thanks again. I think we can close the topic!

#5
Hi there!

Thanks for answering. Ok, I see for the resolution, thanks!
Here is a picture to help see the issue.

I don't need it to scroll nor zoom: it's really like any other room. But this one is litterally a closet, in which the player is "hiding". So the img background has a different size and appears vertical (900*1600).

But I would like the image to vertically fit entirely in my screen (which it doesn't on the picture I sent) - without loosing too much quality ^^'
And if it could be centered, and the sides filled with black but impossible to check with the mouse, it would be great. I mention not being able to click on the black sides as they will obviously be filled with black, but it would have to appear like the screen limits just stopped at the image background limits.

Does that make any sense? ^^

Thanks again!
#6
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