Hi, my first game has probably a very simple problem with 2 things.
The controller support, I have no idea why it won’t work. Do I have to edit the script? Using a PS4 controller.
I have scrolling background, the problem is, I want to stop it once it reaches the end.
Thank you in advance,
Tuukkis @ Rapula Interactive.
For question 2, you should be giving us a bit more information. Like, how do you currently control the scrolling? Maybe what you’ve tried already as a solution. Ideally a screen shot of your scrolling events could help us nut out the issue.
A couple of blind guesses to answer question 2:
i. Scroll the background only when the player moves.
ii. Use a variable to record when you’ve reached the end, and use this in a condition to determine whether or not to scroll.
Thank you, I will provide a screenshot and more info when I’m at the computer
Here we go
Mind you, I removed the controller from events
In this case, you can create a scene variable to hold the scroll amount and, for example, call it yScrollOffest. And in your action, replace 10*TimeDelta() with Variable(yScrollOffset) *TimeDelta().
You can then set the variable to 0 if you want scrolling to stop, and a numberto set it scrolling. This also sets you up for variable speed scrolling, and scrolling in the opposite direction.
Thank you! This community really is helpful.
For question 1, I have never used gamepads but I guess this may help: