Welcome Guest ( Log In | Register )

[ Big| Medium| Small] -



Post new topic Reply to topic  [ 12 posts ] 
    Pokémaniac
  Tue Nov 22, 2011 6:54 am
User avatar
Awesome Bro


Location: Australia
Purpose:
This script allows the map to be scrolled to a certain x, y position. It also allows the map to be scrolled to the player's position.

Instructions:
Paste anywhere above Main to use. No set-up required.

Call $game_map.scroll_to(x posiition, y position, speed) in a call script to scroll to position x, y.

Call $game_map.find_player(speed) in a call script to scroll to the player's position.

Call $game_map.clear_scroll to stop any scroll_to or find_player actions. Use $game_map.clear_scroll(false) to stop any current scrolling as well.

This script is free-to-use. Credits are appreciated but not necessary at all.

To wait for the completion of the scroll, use the following loop:
Image

This loop can be called from a common event and in any type of event except for a parallel process will also stop the player from moving.

Code:
Expand to see the code.


Top Top
Profile      
 

    LaDestitute
  Tue Nov 22, 2011 7:00 am
Gabber Robot
User avatar
Member

Party Mascot
Nice script. This could be useful for cutscenes or showing the layout of areas for recon-esque scenes or when the player first enters an important area. This reminded me of how the later Gex game would do something akin to this, scrolling over to the level's current objective.


Top Top
Profile      
 

    Pokémaniac
  Tue Nov 22, 2011 7:06 am
User avatar
Awesome Bro


Location: Australia
Thanks! Yeah, honestly, this could probably be used almost any time you want to use the normal scroll (to save you having to count out the number of spaces to the object) and any time you want to scroll to a variable place or you don't know where you'll be scrolling from(or both at once). It's something I've wanted in RPG Maker for ages and I only just realised today that I knew enough scripting to do it. :P


Top Top
Profile      
 

    GameBoy
  Tue Nov 22, 2011 4:49 pm
Awesome avatar isn't it?
User avatar
Member


Location: Poland
Can I make instant scroll with this script?


Top Top
Profile      
 

    Pokémaniac
  Tue Nov 22, 2011 11:38 pm
User avatar
Awesome Bro


Location: Australia
No, but this can:
Expand to see the code.


Top Top
Profile      
 

    GameBoy
  Wed Nov 23, 2011 1:06 pm
Awesome avatar isn't it?
User avatar
Member


Location: Poland
Oh yeah, thanks. It's very helpfull.


Top Top
Profile      
 

    GameBoy
  Tue Dec 06, 2011 11:49 pm
Awesome avatar isn't it?
User avatar
Member


Location: Poland
Sorry for double post - I checked that instant scroll script - it didn't work.

It throws me an error:

Quote:
Script Instant Scroll line 23: NoMethodError
undefined method 'set_display_pos' for <Game_Map>


Any solution?


Top Top
Profile      
 

    Pokémaniac
  Wed Dec 07, 2011 8:03 am
User avatar
Awesome Bro


Location: Australia
Are you using XP or VX? This is a VX script.


Top Top
Profile      
 

    GameBoy
  Wed Dec 07, 2011 2:52 pm
Awesome avatar isn't it?
User avatar
Member


Location: Poland
This is for VX, damn. :x

Can you make same script for XP, please?


Top Top
Profile      
 

    Pokémaniac
  Thu Dec 08, 2011 12:17 am
User avatar
Awesome Bro


Location: Australia
Um, I'm a bit busy at the moment. Would someone like to take this? You'd just have to change the vocab, and change the 8, 6, 13 and 17 to the XP screen width/height in tiles, hopefully. Sorry!


Top Top
Profile      
 

    GameBoy
  Thu Dec 08, 2011 12:01 pm
Awesome avatar isn't it?
User avatar
Member


Location: Poland
Ok, thanks for tips, I'll try that.


Top Top
Profile      
 

    Pokémaniac
  Thu Dec 08, 2011 12:31 pm
User avatar
Awesome Bro


Location: Australia
Expand to see the code.


The centering's pretty bad because XP has a stupid amount of tiles, but there you go!


Top Top
Profile      
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 


Who is online

Users browsing this forum: No users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

We are an independent, not-for-profit game making community.
Homepage
Board Index
About Us
Downloadable Games
Free Browser Games
Games in Development
RPG Maker Support
Game Maker Support
Construct 2 Support
HBGames the eZine
Advanced RPG Maker
Site Announcements
Powered by phpBB © phpBB Group