Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Scrolling to Events

Star

Sponsor

Its really been a pain. I've tried so many different conditional branch + variable combo and got nothing but heart break everytime as the screen shook violently and drove itself off into a corner of a map. Is there any way at all to scroll the map to specific map coordinates on a map set by variables or an event. Any Input would be greatly appreciated. Thanks
 
If you continue to have no luck, I would suggest putting some sort of request in Script Requests since this is quite difficult to do using events.

I have come across this problem myself in the past, but I just simply resorted to fading the screen to black, and fading it back in to the event I needed it to, and that worked fine for my system. If this doesn't work for you, you could try the following algorithm:

Set variables for the Hero's X and Y coordinates, as well as variables for the destination's X and Y coordinates. Subtract the Y and X values and then have a loop with a counter for scrolling one tile to the left, right, up, or down based on whether the difference is positive or negative. Stop the scrolling when it has scrolled the necessary length.

Hope that makes sense. It probably won't work very well. If it doesn't, you'll either have to do it based on a script (which shouldn't be too difficult but I'm not sure how to do it), otherwise use that fade-in fade-out method if that works for you.
 

Star

Sponsor

ImmuneEntity":1erz8xor said:
If you continue to have no luck, I would suggest putting some sort of request in Script Requests since this is quite difficult to do using events.

I have come across this problem myself in the past, but I just simply resorted to fading the screen to black, and fading it back in to the event I needed it to, and that worked fine for my system. If this doesn't work for you, you could try the following algorithm:

Set variables for the Hero's X and Y coordinates, as well as variables for the destination's X and Y coordinates. Subtract the Y and X values and then have a loop with a counter for scrolling one tile to the left, right, up, or down based on whether the difference is positive or negative. Stop the scrolling when it has scrolled the necessary length.

Hope that makes sense. It probably won't work very well. If it doesn't, you'll either have to do it based on a script (which shouldn't be too difficult but I'm not sure how to do it), otherwise use that fade-in fade-out method if that works for you.
That is exactly what I was trying. I made an invisible event move towards the target at speed of 6 in the same direction of each scroll. I was scrolling one tile at a time and subtracting or adding depending on the difference between the current scroll and the new location. Anyway. I've tried a new method. Which is to make a replica of the player and transfer it to her location and make the player invisible and transfer her to the location I want to scroll too. Thanks for your help anyway. I don't understand why the method you mentioned above never worked
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top