Page 1 of 1
how can I do this?
Posted:
Mon Mar 07, 2011 10:21 pm
by totalgamer
How can I center a form on the screen
For example the 1945 demo goes to the left top of my monitor how can I set center screen in a script?
Re: how can I do this?
Posted:
Mon Mar 07, 2011 10:23 pm
by schnellboot
I don't think you can ..
Re: how can I do this?
Posted:
Mon Mar 07, 2011 10:29 pm
by totalgamer
I figured it out with this code
directional_velocity=12;
angle=rand(360);
Re: how can I do this?
Posted:
Mon Mar 07, 2011 10:33 pm
by schnellboot
this code has nothing to do with that .....
Re: how can I do this?
Posted:
Mon Mar 07, 2011 10:45 pm
by totalgamer
your right what are xscreen and yscreen do?
Re: how can I do this?
Posted:
Mon Mar 07, 2011 10:49 pm
by schnellboot
Hm.. I don't understand you sorry
Re: how can I do this?
Posted:
Mon Mar 07, 2011 11:15 pm
by totalgamer
is there a way to center the windows of a game by using code? I want to center the 1945 game window.
Re: how can I do this?
Posted:
Mon Mar 07, 2011 11:15 pm
by AliceXIII
if you click on help in GE and documentation it will explain alot of GE's functions and variables..
also xscreen and yscreen is for this:
xscreen: The Actor's horizontal screen position in screen coordinates.
yscreen: The Actor's vertical screen position in screen coordinates.
Re: how can I do this?
Posted:
Mon Mar 07, 2011 11:19 pm
by lcl
It's not possible to set the position, but you can drag the window by mouse..
Re: how can I do this?
Posted:
Tue Mar 08, 2011 12:20 am
by totalgamer
so [b]theres no way to set the position of the game window? If the scripting is a C language shouldn't there be a code to set the position? When I run the game from the editor using game mode the last position I had the game was saved but not when I run the compiled exe.[/b]
Re: how can I do this?
Posted:
Tue Mar 08, 2011 1:02 am
by skydereign
gE does not use all of C. There are a lot of things we can't do, this is a game creator after all. We have no control of anything outside the game directory. If you use full screen, the game will be centered, but it is full screen.
Re: how can I do this?
Posted:
Tue Mar 08, 2011 5:50 am
by schnellboot
haha alice xD epic
Re: how can I do this?
Posted:
Tue Mar 08, 2011 3:16 pm
by AliceXIII
schnellboot wrote:haha alice xD epic
What was epic
haha
script reference is a great place to learn lol
he also pm'ed me about this he was wanting to center the game screen after you click game mode which i told him you cant do
Re: how can I do this?
Posted:
Tue Mar 08, 2011 5:13 pm
by again
I know you can center screen with code. Find out the resolution of your computer and use the GetCenter() function.
No matter the resolution size is 400x400 or 800x800 the center is 0,0 on all screens.
- Code: Select all
GetCenter("0","0");
Just kidding sky is right there is no way in game editor.