how can I do this?

Talk about making games.

how can I do this?

Postby totalgamer » Mon Mar 07, 2011 10:21 pm

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?
totalgamer
 
Posts: 13
Joined: Mon Mar 07, 2011 8:09 pm
Score: 0 Give a positive score

Re: how can I do this?

Postby schnellboot » Mon Mar 07, 2011 10:23 pm

I don't think you can ..
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: how can I do this?

Postby totalgamer » Mon Mar 07, 2011 10:29 pm

I figured it out with this code
directional_velocity=12;
angle=rand(360);
totalgamer
 
Posts: 13
Joined: Mon Mar 07, 2011 8:09 pm
Score: 0 Give a positive score

Re: how can I do this?

Postby schnellboot » Mon Mar 07, 2011 10:33 pm

this code has nothing to do with that .....
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: how can I do this?

Postby totalgamer » Mon Mar 07, 2011 10:45 pm

your right what are xscreen and yscreen do?
totalgamer
 
Posts: 13
Joined: Mon Mar 07, 2011 8:09 pm
Score: 0 Give a positive score

Re: how can I do this?

Postby schnellboot » Mon Mar 07, 2011 10:49 pm

Hm.. I don't understand you sorry
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: how can I do this?

Postby totalgamer » Mon Mar 07, 2011 11:15 pm

is there a way to center the windows of a game by using code? I want to center the 1945 game window.
totalgamer
 
Posts: 13
Joined: Mon Mar 07, 2011 8:09 pm
Score: 0 Give a positive score

Re: how can I do this?

Postby AliceXIII » Mon Mar 07, 2011 11:15 pm

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.
"Taking a breath of fresh air."
User avatar
AliceXIII
 
Posts: 325
Joined: Fri Sep 17, 2010 2:36 am
Location: victoria, texas
Score: 37 Give a positive score

Re: how can I do this?

Postby lcl » Mon Mar 07, 2011 11:19 pm

It's not possible to set the position, but you can drag the window by mouse.. :P
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: how can I do this?

Postby totalgamer » Tue Mar 08, 2011 12:20 am

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]
totalgamer
 
Posts: 13
Joined: Mon Mar 07, 2011 8:09 pm
Score: 0 Give a positive score

Re: how can I do this?

Postby skydereign » Tue Mar 08, 2011 1:02 am

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: how can I do this?

Postby schnellboot » Tue Mar 08, 2011 5:50 am

haha alice xD epic
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: how can I do this?

Postby AliceXIII » Tue Mar 08, 2011 3:16 pm

schnellboot wrote:haha alice xD epic


What was epic :P 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 :D
"Taking a breath of fresh air."
User avatar
AliceXIII
 
Posts: 325
Joined: Fri Sep 17, 2010 2:36 am
Location: victoria, texas
Score: 37 Give a positive score

Re: how can I do this?

Postby again » Tue Mar 08, 2011 5:13 pm

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.
Free windows mobile games like doodle jump and super mario bros
http://krenisis.freeforums.org/
again
 
Posts: 258
Joined: Wed Jan 19, 2011 7:06 pm
Score: 33 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest