Region Events

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Tsukihime, Dec 30, 2013.

    Tags:
  1. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,062
    Location:
    Toronto
    First Language:
    English
    [​IMG]


    This script allows you to create “Region Events”. Basically, it allows you to turn an entire region into an event based on an existing event on your map.


    For example, suppose you have some Region 1 tiles. Using this script, you can connect Region 1 to an event on the map. The result is called “Region Event 1″, and when you activate Region Event 1, it will run the event it is connected to.


    Region events obey all event rules. They do not have a graphic, because they are simply regions on your map. Region events are useful when you want multiple tiles to all run the same event.


    Get it at Hime Works!
     
    Last edited by a moderator: Feb 19, 2014
    #1
    Galenmereth likes this.
  2. Misaki

    Misaki Pikalyze Veteran

    Messages:
    156
    Likes Received:
    24
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    Handy. There was a script that I saw awhile back that did something similar to this. In fact, now that I think about it, there are a lot of region-based scripts if you think about it. Well, this is the most simpler to use :)
     
    #2
  3. Marcio

    Marcio Roadrunner for Lighnting and Strike Detonator Veteran

    Messages:
    63
    Likes Received:
    2
    First Language:
    German
    This is insane for making cutscene triggers! :D

    So you basically have to make one Event and not two or more if your zone is greater then 1 Tile. ;) Well, thank you, this is really awesome! ^^
     
    #3
  4. Galenmereth

    Galenmereth I thought what I'd do was Veteran

    Messages:
    2,206
    Likes Received:
    1,917
    Location:
    Norway
    First Language:
    English
    Primarily Uses:
    RMMV
    This is really nice, Hime! Now I can get rid of all those duplicate events I have spread around~
     
    #4
  5. DarthVollis

    DarthVollis Moogle Master Veteran

    Messages:
    410
    Likes Received:
    85
    Location:
    Kupoburg
    First Language:
    English
    I just ran across a script that breaks the limits of the regions. Will your Region Events work with it? By the way here is that script.

    Code:
    #sb:region_limit_breaker [field, utility]#==============================================================================# Region Limit Breaker# Version 1.00# By Napoleon## About:# Allows you to assign extra regions to a map up to 127.# Meant for advanced users.## Instructions:# - Place below "▼ Materials" but above "▼ Main Process".# - Edit the Settings part to your needs.# - Optional: use the new "assign_region(x, y, region_id=0)" command.## Requires:# - RPG Maker VX Ace## Terms of Use:# - Attribution 3.0 Unported (CC BY 3.0)#   [URL="http://creativecommons.org/licenses/by/3.0/#"]http://creativecommons.org/licenses/by/3.0/#[/URL] - Attribution is not required. This overrules what's stated in the above#   license.## Version History:# 1.00 (09 December 2013)#   - First Release#-------------------------------------------------------------------------------# Settings# Note: Do NOT add values > 127 or you will get weird values.#-------------------------------------------------------------------------------NAP_MAPS_LB = {  1 => { # 1 will apply this ONLY to the map with map_id == 1         [4,4] => 127, # Will assign region #127 to tile [4,4]         [0,0] => 89, # Will assign region #98 to tile [0,0] (most top left tile)       }}#-------------------------------------------------------------------------------$imported ||= {}$imported[:region_limit_breaker] = 1.00class Game_Map  alias nap_region_lb_setup setup  def setup(map_id)    nap_region_lb_setup(map_id)    return if NAP_MAPS_LB[map_id].nil?    NAP_MAPS_LB[map_id].each_pair do |k,v|      $game_map.data[k[0], k[1], 3] = v * 256    end  end # setupend # Game_Mapclass Game_Interpreter  def assign_region(x, y, region_id=0)    $game_map.data[x, y, 3] = region_id * 256  endend#===============================================================================## End of File##===============================================================================
     
    #5
  6. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,062
    Location:
    Toronto
    First Language:
    English
    It should. My script doesn't cache map regions, so everytime you check a tile, it will perform an extra check to see if there are any region events there based on region ID.


    Would be a different story if I assumed regions don't change, but I decided that was a bad assumption.


    EDIT: I just tested it and it works.


    [​IMG]
     
    Last edited by a moderator: Jan 20, 2015
    #6
    Alexander Amnell likes this.

Share This Page