Re: Hello - New Member
The reason for this is the last two lines of your view's draw actor. You created boundaries for the first level, and haven't updated them for the second level. I'd suggest creating the boundaries as variables, that way you can do something like this.
That way the last two lines you can switch out the numbers with those variables. Another thing to note is if you are having lots of levels, you need to set up some variable to hold what level you are in. That way you can easily organize the xy locations for each level. If you know about arrays, that could help as well.
- Code: Select all
if(doorstate==2)
{
tux.y = 1000;
// essentially four variables to represent the top left and bottom right points
tl_view_x = 0;
tl_view_y = 800;
br_view_x = 12000;
br_view_y = 1400;
}
That way the last two lines you can switch out the numbers with those variables. Another thing to note is if you are having lots of levels, you need to set up some variable to hold what level you are in. That way you can easily organize the xy locations for each level. If you know about arrays, that could help as well.