LOGIN
SEARCH
PROFILE
keys: ↑ ↓
LOGOUT
INDEX
MEMBERS
keys: ↑ ↓
HOME
PORTAL
PLAY ALONG
PLAY with WORDS
PLAY with GRAPHICS
PLAY with SOUNDS
PLAY with CODES
PLAY with PROJECTS
keys: ← →
Guest Access
Register:
Members:



View previous topic View next topic Go down Message [Page 1 of 1]

EVENTALIST
EVENTALIST
#1 default XP - Advanced Map Scrolling
Loading

mr_wiggles

mr_wiggles
EVENTALIST
 EVENTALIST
EVENTALIST
profile
Advanced Map Scrolling
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) Razz


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

[You must be registered and logged in to see this link.]


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
#2 default Re: XP - Advanced Map Scrolling
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
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)
Administrator
Show Signature
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
EVENTALIST
EVENTALIST
#3 default Re: XP - Advanced Map Scrolling
Loading

mr_wiggles

mr_wiggles
EVENTALIST
 EVENTALIST
EVENTALIST
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
#4 default Re: XP - Advanced Map Scrolling
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
well you're a bad@$$ for this script so far... seriously "sweet demo!"
Administrator
Show Signature
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
EVENTALIST
EVENTALIST
#5 default Re: XP - Advanced Map Scrolling
Loading

mr_wiggles

mr_wiggles
EVENTALIST
 EVENTALIST
EVENTALIST
profile
Oh i converted the script and sent it to you, enjoy. Very Happy
EVENTALIST
Show Signature
EVENTALIST
C.O.R.N.
C.O.R.N.
#6 default Re: XP - Advanced Map Scrolling
Loading

BluE

BluE
C.O.R.N.
C.O.R.N.
C.O.R.N.
profile
lol at restrictions. C:<
C.O.R.N.
Show Signature


Want a real challenge? Try [You must be registered and logged in to see this link.]

If you read this message, please PM me. this is a test. And I'm serious, this isnt just some lousy time wasting paragraph that I wrote just to fill in my signature. It's here for a reason. PM ME.
C.O.R.N.
http://51s-seedy-masteroogway.blogspot.com
EVENTALIST
EVENTALIST
#7 default Re: XP - Advanced Map Scrolling
Loading

mr_wiggles

mr_wiggles
EVENTALIST
 EVENTALIST
EVENTALIST
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?
EVENTALIST
Show Signature
EVENTALIST
||||||||||
||||||||||
#8 default Re: XP - Advanced Map Scrolling
Loading

supercow

supercow
||||||||||
||||||||||
profile
this is AWESOME cheers
i made archer competition with this Razz
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 Happy 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) Wink
XAS RULE cheers cheers cheers
||||||||||
Show Signature
||||||||||
C.O.R.N.
C.O.R.N.
#9 default Re: XP - Advanced Map Scrolling
Loading

BluE

BluE
C.O.R.N.
C.O.R.N.
C.O.R.N.
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


Want a real challenge? Try [You must be registered and logged in to see this link.]

If you read this message, please PM me. this is a test. And I'm serious, this isnt just some lousy time wasting paragraph that I wrote just to fill in my signature. It's here for a reason. PM ME.
C.O.R.N.
http://51s-seedy-masteroogway.blogspot.com
WORDSMITH
WORDSMITH
#10 default Re: XP - Advanced Map Scrolling
Loading

Cardboard Square

Cardboard Square
WORDSMITH
WORDSMITH
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
WORDSMITH
Show Signature
WORDSMITH
||||||||||
||||||||||
#11 default Re: XP - Advanced Map Scrolling
Loading

supercow

supercow
||||||||||
||||||||||
profile
Wow that would be cool @Blue
if there can be seperate screen thats active (left screen player, right screen monster) it would be super awesome Shocked
it could be used for dramatic event or cut scene Razz
example : chasing some pervert/thief Very Happy
||||||||||
Show Signature
||||||||||

Sponsored content

profile

View previous topic View next topic Back to top Message [Page 1 of 1]

 

Chatbox system disabled
Personal messaging disabled