you can't do it live without major hacking.
room_set_view(ind,vind,vis,xview,yview,wview,hview,xport,yport,wport,hport,hborder,vborder,hspeed,vspeed,obj) Sets the view with index vind (0-7) for the room with the indicated index. vis indicates whether the view is visible. xview, yview, wview, and hview indicate the position of the view in the room. xport, yport, wport, and hport indicate the position on the screen. When the view must follow an object hborder and vborder indicate the minimal visible border that must be kept around the object. hspeed and vspeed indicate the maximal speed with which the view can move. obj is the index of the object or the index of the instance.
Limitations:
Cannot be done on the current room
Does not affect persistent rooms that have been visited.
what I did, I have room1 and room2, they are blank rooms. room 0 is the game. to change the view to match the window, You start in room0. Your controller detects the resize. if I'm in room0 I call room_set_view for room1, else I call room_set_view for room0. Then I set all my instances to be persistent. with(all) persistent = true; then I room_goto room1 or room0 depending when I am. The controller is persistent and detects the room start event. on room start I call
with(all) persistent = false;
persistent = true;
So what happens is you do room switching on the fly, making the instances follow you.
another method is going to a room (changeRoom) and going back to the original. it's not as smooth but it supports persistence of the room
From memory, not tested
ControllerObj, persistent ON
create
doresize = false;
thisroom = room;
waspersitent = room_persistent;
needsresize = false; //set this to true to trigger
step
if(needsresize) //whatever your code is to do that
{
doresize = true;
thisroom = room;
waspersitent = room_persistent;
room_persistent = false;
with(all)
{
__oldpersitent = persistent;
persistent = true;
}
room_goto(changeRoom);
}
on room start
if(doresize)
{
if (room == changeRoom)
{
room_set_view(thisroom,.......)
room_goto(thisroom);
}
else
{
doresize = false;
with(all)
{
persistent = __oldpersitent;
}
room_persistent = waspersitent;
needsresize = false;
}
}