Reputation: 6703
view_xview += 1
I'm trying to make my screen constantly scroll, but it's not moving.
As far as I'm aware you just make an invisible object on your screen and assign this as a step event to it? I've also heard to make the camera follow an invisible object moving on the screen but this seems better surely?
I've enabled my use of views, enabled it to be seen, I've tried
view_xview += 1 and view_xview[0] += 1 because I've seen both, I'm definitely on view0.
Upvotes: 1
Views: 2058
Reputation: 341
The easiest way to do this is to make an object that's invisible but still has a sprite, and just give it an hspeed of 1, then have the view follow it. Create it a bit before the horizontal follow border so that the player can get their bearings before the screen starts moving.
Upvotes: 1
Reputation: 1777
Where are you placed view_xview[0] += 1
? What event? Step? And Object following
must be <no object>
.
So, all steps must be:
obj_controller
Step
, place code: view_xview[0] += 1;
obj_controller
to the roomEnable the use of Views
in the Views
tab)Visible when room starts
for View 0
Also set Use synchronization to avoid tearing
in Global Game Settings -> Windows -> Graphics
Upvotes: 0