Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


RookieDev

Member Since 24 Mar 2013
Offline Last Active Mar 25 2013 12:58 AM

#5046348 Can i get some help with this code?

Posted by RookieDev on 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?




PARTNERS