Can i get some help with this code?

Started by
1 comment, last by LJ_1102 10 years, 12 months ago

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?

Advertisement

Anyone?

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-Engine™Beta

This topic is closed to new replies.

Advertisement