Scripts / Panel coordinates

Author
Message
MChapman
8
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 27th Mar 2016 06:31 Edited at: 27th Mar 2016 06:34
I can't seem to get the panels down, I have played with it for three hours now nad can't seem to get it right. I have even tried to track how they are created but it just seems to be random... here is my set up.

the variables im using forthe coordinates.


The panel command itself


the whole script


he script works fine, I just can't seem to get the hang of panels and how they are drawn/created to the screen.... how is the grid is the center of the screen 50,50 or 0 like on a normal graph? when i use the x1 coordinate as 90 its at the top right of my screen, and when I put it at 1 its in the top let of my screen, and nothing seems to change that.. I'm lost with panels..... Sorry for the long post.

edit: remember the script works fine, I'm just focusing on the panels. if you run the script you will have to press z to see the panel but there will be random numbers cause I haven't placed the minutes/hours/seconds yet.
Markchapman10 is my Skype let's have some dev talk.
PartTimeCoder
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location:
Posted: 27th Mar 2016 09:22
the panel works on screen percentage, x1 0f 10 and x2 of 90 will fill 80% of the screen width and be centered .... its confusing at first! lol
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 27th Mar 2016 13:55
Quote: "local panle_y1 = 50 -- top right corner"

Is there some typo here, or it is fine so? (panle) .

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
MChapman
8
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 27th Mar 2016 14:58
So how do I put a panel at the bottom of the screen in the bottom right corner above the default HUD? Yea its a typo thanks 3com.
Markchapman10 is my Skype let's have some dev talk.
PartTimeCoder
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location:
Posted: 27th Mar 2016 15:04
Quote: "So how do I put a panel at....."


play with the numbers to get it exactly where you want it, but its close

Panel(90, 75, 97, 85)
PM
MChapman
8
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 27th Mar 2016 15:10
Facepalm, lol. these things drove me crazy for hours last night........ would it not have been easier to make x1,y1,x2,y2 individual points so we wouldn't have to play with it? Thanks for the help though fellas.
Markchapman10 is my Skype let's have some dev talk.
PartTimeCoder
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location:
Posted: 27th Mar 2016 15:21
HaHa yea, that percentage system drove me nutz in AGK for a while, a percentage x1,y1 and a width and height would have been better, much easier to locate as only one set of co-ords to play with

or PanelCenterOnX (Please Lee ) to keep inline with the text functions, would be nice to set panel colors to while we on the subject, fill and boarder, I making a list thing and it all looks very bland! lol
PM
MChapman
8
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 27th Mar 2016 15:46
I think since it will be easier, I'll use A picture of a digital watch and do away with the panel. thanks.
Markchapman10 is my Skype let's have some dev talk.
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 27th Mar 2016 16:16
Quote: " would it not have been easier to make x1,y1,x2,y2 individual points so we wouldn't have to play with it?"

No, because everybody who play your game has a different screen size. So you must do a lot more for a simple script, and this can not be a good way for "the easy gamemaker" With a percentage system, you can place it once and see it everywhere on the same place.
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
MChapman
8
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 28th Mar 2016 00:31
It could still be easy, we would just define what we want our screen resolution to be in global loop, also if we wanted it to auto detect it we could make a lua script for that.
Markchapman10 is my Skype let's have some dev talk.
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 28th Mar 2016 17:11
If you want to do it, you can easily convert a screen point in percent So if you can script, this should not be the problem, but for beginners it is easier to do it this way.
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 28th Mar 2016 19:18
If I get right the point, Lee's script might help.



3com

Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
MChapman
8
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 29th Mar 2016 03:31
This helps me in a few different ways, not so much in panels though. I've desided to not use panels but sprites.
Markchapman10 is my Skype let's have some dev talk.
PartTimeCoder
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location:
Posted: 29th Mar 2016 06:18
but.... but.... I just wrote you a script! lol

Na, getting sick of the tedious guesswork myself so wrote a small script to aid in the panel positioning and thought might as well post it here

Attach script to a dynamic object
WSAD= move panel, hold space to move faster
WSAD+SHIFT, resize panel, hold space to resize faster

the exact co-ords are shown on the screen, position and size the panel to where you want it, write down the co-ords, job done one time with zero guess work

Attachments

Login to view attachments
PM
Isagabe
9
Years of Service
User Offline
Joined: 12th Sep 2014
Location:
Posted: 29th Mar 2016 20:05
Wow. Thank you.
MChapman
8
Years of Service
User Offline
Joined: 19th May 2015
Location: USA
Posted: 30th Mar 2016 00:04
lol, that comes in handy as well thank you!
Markchapman10 is my Skype let's have some dev talk.

Login to post a reply

Server time is: 2024-05-03 14:10:31
Your offset time is: 2024-05-03 14:10:31