Guest Access
Go to page : 1, 2
EVENTALIST
EVENTALIST
EVENTALIST
profile
Allows more advanced controls of the games scroll feature.
Demo
Post any errors you get here or any suggestions for a future update.
mr_wiggles
profile
Advanced Map Scrolling
Version: 1.0
Author: Mr_Wiggles
Date: June 15, 2010
Version History
Version: 1.0
Author: Mr_Wiggles
Date: June 15, 2010
Version History
6/15/10 - Original Release
Planned Future Versions
- More features. (idk what yet)
Description
Allows more advanced controls of the games scroll feature.
Features
- Return to Player - Center the screen back on the player.
- Move to Event - Center the screen on an event on the game map.
- Follow Event - Make the screen follow an event as if it where the player.
Instructions
Paste the script in your database above main and below the default scripts.script
- Spoiler:
- Code:
#==============================================================================
# ** Advanced Map Scrolling **
#==============================================================================
# by Mr Wiggles
# Version 1.0
# 6/15/10
#------------------------------------------------------------------------------
# Installining:
# Place in the scripts database abouve main, and below your default sccripts.
#------------------------------------------------------------------------------
# Instructions:
# To use one of the bellow features, in an event use a script command and then
# enter one of the following (without quotes):
#
# "$game_map.return_to_player" - This command will put the screen back to the
# player with out having to scroll the map back.
#
# "$game_map.move_to_event(id)" - This command will put the screen centerded
# on the event id of your choice on the game map.
#
# "$game_map.follow_event(id)" - This command will make the screen follow the
# event id of your choice on the game map.
#
#==============================================================================
class Game_Map
alias map_scrolling_ini initialize
def initialize
map_scrolling_ini
@old_event_x = 0
@old_event_y = 0
@following_event = nil
end
def return_to_player
clear_following
x = $game_player.real_x
y = $game_player.real_y
if (x/128) <= (width - 10)
x / 128 > 10 ? @display_x = x - 1280 : @display_x = 0
else
@display_x = (width - 20) * 128
end
if (y/128) <= (height - 8)
y / 128 > 8 ? @display_y = y - 896 : @display_y = 0
else
@display_y = (height - 15) * 128
end
end
def move_to_event(id)
clear_following
for event in $game_map.events.values
if event.id == id
x = event.real_x
y = event.real_y
if (x/128) <= (width - 10)
x / 128 > 10 ? @display_x = x - 1280 : @display_x = 0
else
@display_x = (width - 20) * 128
end
if (y/128) <= (height - 8)
y / 128 > 8 ? @display_y = y - 896 : @display_y = 0
else
@display_y = (height - 15) * 128
end
return
end
end
print ("Unable to find event, either it doesn't exsist or it was deleted in the game.")
end
def clear_following
@old_event_x = 0
@old_event_y = 0
@following_event = nil
end
def follow_event(id)
for event in $game_map.events.values
if event.id == id
move_to_event(id)
@following_event = id
@old_event_x = event.real_x if event.real_x != @old_event_x
@old_event_y = event.real_y if event.real_y != @old_event_y
return
end
end
print ("Unable to find event, either it doesn't exsist or it was deleted in the game.")
end
alias map_scrolling_upda update
def update
map_scrolling_upda
if @following_event != nil
for event in $game_map.events.values
next if event.id != @following_event
s = event.move_speed
if event.real_x != @old_event_x or event.real_y != @old_event_y
x = event.real_x
y = event.real_y
if (x/128) <= (width - 10)
x / 128 > 10 ? @display_x = x - 1280 : @display_x = 0
else
@display_x = (width - 20) * 128
end
if (y/128) <= (height - 8)
y / 128 > 8 ? @display_y = y - 896 : @display_y = 0
else
@display_y = (height - 15) * 128
end
@old_event_x = event.real_x
@old_event_y = event.real_y
end
end
end
end
end
class Game_Character
attr_reader :move_speed
end
Demo
Support
Post any errors you get here or any suggestions for a future update.
Known Compatibility Issues
None that i know of...Restrictions
Don't post this on any other forum without my permission. EVENTALIST
Show Signature
EVENTALIST
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
sweet demo! and quite a nifty little script for cut scenes.
what about zoom in and out on an event?
(I thought that was the SDK demo I sent ya)
what about zoom in and out on an event?
(I thought that was the SDK demo I sent ya)
Administrator
Show Signature
EVENTALIST
EVENTALIST
EVENTALIST
profile
mr_wiggles
profile
lol, yea i'm working on converting that one, but i wanted something original that i made. I'm still gonna convert the one that is in sdk.
EVENTALIST
Show Signature
EVENTALIST
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
well you're a bad@$$ for this script so far... seriously "sweet demo!"
Administrator
Show Signature
EVENTALIST
EVENTALIST
EVENTALIST
profile
mr_wiggles
profile
Oh i converted the script and sent it to you, enjoy.
EVENTALIST
Show Signature
EVENTALIST
C.O.R.N.
EVENTALIST
EVENTALIST
EVENTALIST
profile
mr_wiggles
profile
what, that you cant paste this like 200 line script some where else? lol
you guys have any suggestions for some extra features that could be added?
you guys have any suggestions for some extra features that could be added?
EVENTALIST
Show Signature
EVENTALIST
||||||||||
||||||||||
||||||||||
profile
supercow
profile
this is AWESOME
i made archer competition with this
in XAS i put the follow event to the arrow(hit target thats far away) and after it hit it scroll back to the player very fun
theres so much more that can be done with this.....
i cant think of any extra feature right now maybe later...
or you can make some simple point system (for each kill)
XAS RULE
i made archer competition with this
in XAS i put the follow event to the arrow(hit target thats far away) and after it hit it scroll back to the player very fun
theres so much more that can be done with this.....
i cant think of any extra feature right now maybe later...
or you can make some simple point system (for each kill)
XAS RULE
||||||||||
Show Signature
||||||||||
C.O.R.N.
C.O.R.N.
C.O.R.N.
profile
BluE
profile
no ideas. it's pretty much complete. unless you have offset of something. like it has the player at the side of the screen for a cut scene.
C.O.R.N.
Show Signature
WORDSMITH
WORDSMITH
WORDSMITH
profile
Cardboard Square
profile
Sweet Wiggles! I was just thinking of how I would make the screen follow an event as though it were the hero earlier today!
Not sure if it would be needed, but since you asked for ideas, what if you added a feature to pan the screen to a specified Scene x/Scene y for the hero or event or what not?
-CS
Not sure if it would be needed, but since you asked for ideas, what if you added a feature to pan the screen to a specified Scene x/Scene y for the hero or event or what not?
-CS
WORDSMITH
Show Signature
WORDSMITH
Go to page : 1, 2
GAMEFACE101 » MEDIA » PLAY with CODE! » PLAY with CODE (scripts and software) » RGSS (RMXP SCRIPTS) »XP - Advanced Map Scrolling
Similar topics