Jump to content

  • Log In with Google      Sign In   
  • Create Account


Can i get some help with this code?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 RookieDev   Members   -  Reputation: 106

Like
1Likes
Like

Posted 24 March 2013 - 04:21 PM

Im new here so im guessing this is the right spot for this question.

 

Im using Game Maker Studio and im making an android game i have a code that is a universal script but im not sure how to place it into my game.

I was wondering if i could get some help with it

 

{
// Set the size of the display
globalvar DISPLAY_WIDTH, DISPLAY_HEIGHT;
if (YoYo_GetPlatform() == os_ios && YoYo_GetDevice() == 2)
{ DISPLAY_WIDTH = 1024; DISPLAY_HEIGHT = 768; }
else
{ DISPLAY_WIDTH = 960; DISPLAY_HEIGHT = 640; } 
// Set the views in the rooms
room_set_view_enabled(room_title,true);
room_set_view(room_title,0,true,(1024 - DISPLAY_WIDTH) div 2,
(768 - DISPLAY_HEIGHT) div 2,DISPLAY_WIDTH,DISPLAY_HEIGHT,
0,0,DISPLAY_WIDTH,DISPLAY_HEIGHT,0,0,-1,-1,-1);
// Add views for the other rooms here 
// Now go to the title menu room
room_goto(room_title);
}

 

Im trying to figure out where i should put my room names for the size adjustment to take place,I have been messing around with this for awhile and i havnt been able to come up with anything.Can someone help me out?



Sponsor:

#2 RookieDev   Members   -  Reputation: 106

Like
0Likes
Like

Posted 25 March 2013 - 12:46 AM

Anyone?



#3 LJ_1102   Members   -  Reputation: 903

Like
0Likes
Like

Posted 26 April 2013 - 04:13 PM

Looks like a function body without header, what language is that ?

 

As to your question it looks like you must duplicate these two lines and replace room_title with your room names like so


room_set_view_enabled("room1",true);
room_set_view("room1",0,true,(1024 - DISPLAY_WIDTH) div 2,
(768 - DISPLAY_HEIGHT) div 2,DISPLAY_WIDTH,DISPLAY_HEIGHT,
0,0,DISPLAY_WIDTH,DISPLAY_HEIGHT,0,0,-1,-1,-1);

Jan F. Scheurer - CEO @ Xe-Development

Sign Up for Xe-EngineBeta

 





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS