Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: SirLean on Tue 18/07/2023 01:37:20

Title: SOLVED - Buttons showing a weird grid when I pick up an object
Post by: SirLean on Tue 18/07/2023 01:37:20
So I started this project, basically it's a guy that will ascend on looks and improve by solving quests and doing cool missions where he learns a lot about life.

But weirdly, when I click that book to pick it up, the "cursor buttons" I have in the top left of the screen show a weird grid...this is my code for picking up the book

https://ibb.co/kMy8QCQ

The weird grid shows up exactly when I click on the book. It comes back to normal after picking it up.

This is the normal view of the cursors in the top left

https://ibb.co/ZgwwQkQ


and this is the weird grid I'm writing about

https://ibb.co/K5S7ZNX

So... what's going on you guys?  :confused:  :kiss:

Title: Re: Buttons showing a weird grid when I pick up an object
Post by: Crimson Wizard on Tue 18/07/2023 02:17:02
This is the "disabled interface" effect applied when the game is paused during the "blocking" action. It may be removed by changing the following option:

General Settings -> Visual -> When player interface is disabled, GUIs should...
Title: Re: Buttons showing a weird grid when I pick up an object
Post by: SirLean on Tue 18/07/2023 03:04:00
It worked! you are a genius Crimson Wizard!  :kiss:
Title: Re: Buttons showing a weird grid when I pick up an object
Post by: Nahuel on Tue 18/07/2023 08:38:18
Hey there! Just to add you can also create a snippet for the code instead of an image

Copy the image link https://i.ibb.co/N73jZBZ/code-for-picking-up-book.jpg you can then click

(https://i.ibb.co/nj77sHk/Screenshot-2023-07-18-at-09-30-34.png)

And insert the image in the chat so no need to get to the link.

And you can also add let's say a width=450 then it won't be that big.

Here's an example:
(https://i.ibb.co/N73jZBZ/code-for-picking-up-book.jpg)

And as per the code the same but a different button

function here()
{

}
Title: Re: Buttons showing a weird grid when I pick up an object
Post by: SirLean on Tue 18/07/2023 14:09:51
Thank you Nahuel :smiley:
Title: Re: Buttons showing a weird grid when I pick up an object
Post by: Khris on Tue 18/07/2023 15:18:40
Please never post code as image.

Just copy paste it in between [code] tags
Title: Re: Buttons showing a weird grid when I pick up an object
Post by: Crimson Wizard on Tue 18/07/2023 15:24:40
Quote from: Khris on Tue 18/07/2023 15:18:40Please never post code as image.

To clarify, it's a bad practice, because if one would like to test the code in AGS, or post a corrected version of a code, they would have to manually read it from screenshot and retype everything.