Ashley - I have been trying to set up a procedural random level generator and I noticed that the size of the layout can't be changed at runtime. This seems like it would be a good feature to me and would make a lot of randomization easier. It seems it would also be a good companion feature to "change canvas size." Thanks, Morgan.
Have you tried "Wait 0.01 seconds" ?
Yes. It doesn't seem to change the options. You can set layout scale (which proportionally scales the entire layout) or set canvas size but you can't change the layout size.
Use "Unbounded scrolling set to Yes" you will get infinite layout size.
I don't want an infinite size, I want it to be a range of very specific options and as we were discussing before, it seems the "scroll to" behavior doesn't work right with that chosen. Not sure why. Thanks.
"Unbounded scrolling
By default the game window cannot scroll past the edges of the layout. Set this to Yes to allow unlimited scrolling in any direction, even past the edges of the layout."
Scroll to works perfectly fine with unbounded scrolling.
Develop games in your browser. Powerful, performant & highly capable.
Fair enough. Regardless, I am wanting to change the layout to very specific sizes, randomly.
unbounded + walls = any size you like.
Just set unbounded scrolling and impose your own custom limits with events. 'Scroll To' definitely works with unbounded scrolling.
Make example object zone that is the size of your level or the area where you want the camera to move and use this.
Scroll to X = lerp(scrollx,(clamp(hero.X,zone.X+(round(ViewportRight(0)-ViewportLeft(0))/2),zone.X+zone.Width-(160))),0.1*60*dt) Scroll to Y = lerp(scrolly,(clamp(hero.Y,zone.Y+(round(ViewportBottom(0)-ViewportTop(0))/2),zone.Y+zone.Height-(120))),0.1*60*dt)[/code:280kfph4]
Thanks everyone.