Persecution - How Did you make your screen scroll like that?

Can you give me a tutorial on how you did that?


You need one object. Set it so it has 4 collision triggers, one for each side. Then attach a switch to each on, connect each output of the collisions to the on input of each switch. Next you need to connect the collisions to the non corresponding switches to the off input.

Ex) UP collision - On UP switch
Off DOWN switch
Off Right switch
Off Left switch

Now connect an Always trigger to initiate all four switches. Connect each switch to an equation of A+10, or A-10. A being 0. Each switch output connects to it’s own input, as well as the 3 other equation input.

Ex) UP collision/up ON switch/A-10. UP is A-10 because you want the screen to scroll in a negative direction.

     RIGHT collision/right ON switch/A+10. RIGHT is A+10 because you want the screen to scroll in a positive direction. 

Now connect a timer of 10 to each equation. Then connect the output of the timer to the off input of the corresponding switch. Also, you have to connect the equations to the screen scroll logic. UP/DOWN to the Y, and LEFT/RIGHT to the x.

Ex) UP collision/up ON switch/A-10/scroll Y/
…/Timer(10)/up OFF switch.

Set the barriers within the screen scroll logic to 100 and -100.

Thanks @leonknighte