Verb coin icons stuck on top of one another

Started by cattea, Sat 31/12/2022 19:47:29

Previous topic - Next topic

cattea

Hi everyone,

I've gone through the tutorial and tried searching the manual and the internet, but I'm really stuck! When I run my game, all of the different verb coin verb icons are stacked on top of one another. I tried to change their positions to top left, top right, bottom left, and bottom right, but it makes no difference so I cannot use anything except the verb on top.  :( 

I changed my resolution to 640x400 and it looks like this broke some of the default GUIs in general, so perhaps that is the cause. I'm really struggling to find information/tutorials/manuals and I'm not used to using a forum so I apologize if this was asked. I genuinely spent hours trying to figure this out


cattea

#1

Screenshot of the issue

Sorry, my image didn't go through the first time!

Khris

First of all, if you're just starting with the game, consider changing the resolution to 640x360. This will nicely scale up to all common HD resolutions because it's 16:9 and exactly a third of 1920x1080.

As for the buttons: open the VerbCoin script header (VerbCoin.ash) and look at line 2:
Code: ags
#define VERBCOIN_DEFAULT_RADIUS 38
Try changing the number to a bigger one.

If that doesn't help, open the main script (VerbCoin.asc) and look at the place_button function (line 170). In there the module calculates the button positions.

Also, when you changed the resolution to 640x400, the editor asked you whether you want to resize the GUIs accordingly. Did you confirm this or no? Because the GUIs and GUI sprites are all made for a lowres game, and you probably have to do a bunch of adjustments to the GUIs even when you confirm the resizing.

cattea

Thank you so much--that worked! :-D You made a great point about the resolution recommendation. Unfortunately I am a ways in already but in the future I will for sure follow that advice. Hopefully having to use 640x400 won't come back to bite me later!

Sorry for the noob question but is there a verb coin-specific manual that you are aware of just in case I get stuck later on on anything?

Khris

#4
Not that I know of, you have to rely on the comments in the Global Script's game_start function and the existing function calls afaik. It's just a different way of clicking stuff with four separate cursor modes though, so not really to complicated to set up.

To find the solution to your issue I
1) looked at the list of functions and found place_button
2) right-clicked the radius variable and clicked "Go to Definition of radius"
3) found line 14 and right-clicked the constant, then clicked on "Go to Definition of VERBCOIN_DEFAULT_RADIUS"
4) based on the place_button code assumed that increasing the value would fix the problem

SMF spam blocked by CleanTalk