Event Updater Support

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
154
First Language
English
Primarily Uses
Hi, below is a short script by Kread that helps update events, can someone please explain what the numbers for dx and dy do and why, when I increase them, I don't notice a difference.

# Put [update] in the event's name and the move route will always update.
#
# ~Kread
 
class Game_Event < Game_Character 
  #--------------------------------------------------------------------------
  # * Determine if Near Visible Area of Screen
  #--------------------------------------------------------------------------
  alias_method:)krx_alfix_ge_nts?, :near_the_screen?)
  def near_the_screen?(dx = 12, dy = 8)
    # YEA compatibility
    if $imported && $imported["YEA-CoreEngine"]
      dx = dy = nil
    end # YEA compatibility
    return true if @event.name.include?('[update]')
    return krx_alfix_ge_nts?(dx, dy)
  end
end
Could someone explain how I could alter this script to extend the distance it updates my events?

Also, could I rename "[update]" to "update" because the brackets are interfering with a different script I am using.

thanks.
 
Last edited by a moderator:

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
You can change [update] as long as you change it in the script and all events as well. I believe dx ad dy would be the number of tiles around the screen to check. Look at the default near_the_screen? method.
 

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
154
First Language
English
Primarily Uses
I thought so, but when I increased the dx and dy parameters, I didn't notice an increase in event update
 

♥SOURCE♥

Too sexy for your party.
Veteran
Joined
Mar 14, 2012
Messages
693
Reaction score
411
Primarily Uses
You won't notice it if you put the [update] thing...
 

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
154
First Language
English
Primarily Uses
You won't notice it if you put the [update] thing...
This is actually in reference to a different script --- I am using an event spawner by Kread that does not recognize brackets in event names
 

♥SOURCE♥

Too sexy for your party.
Veteran
Joined
Mar 14, 2012
Messages
693
Reaction score
411
Primarily Uses
I know. I am talking about the script included in your first post.

Hi, below is a short script by Kread that helps update events, can someone please explain what the numbers for dx and dy do and why, when I increase them, I don't notice a difference.
# Put [update] in the event's name and the move route will always update.## ~Kread class Game_Event < Game_Character #-------------------------------------------------------------------------- # * Determine if Near Visible Area of Screen #-------------------------------------------------------------------------- alias_method:)krx_alfix_ge_nts?, :near_the_screen?) def near_the_screen?(dx = 12, dy = 8) # YEA compatibility if $imported && $imported["YEA-CoreEngine"] dx = dy = nil end # YEA compatibility # If you use the tag, the event should always update the movement. return true if @event.name.include?('[update]') # If you don't, then it will call the original method, and THIS is where # dx and dy are used. return krx_alfix_ge_nts?(dx, dy) endendIf you change dx or dy, you will only see a difference if you don't use the tag in the event name. 
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,045
Members
137,569
Latest member
Shtelsky
Top