Can an event change the passability of a tile?

Discussion in 'RPG Maker MV' started by RHachicho, Nov 3, 2016.

    Tags:
  1. RHachicho

    RHachicho Veteran Veteran

    Messages:
    264
    Likes Received:
    125
    Location:
    Basildon, United Kingdom
    First Language:
    English
    Hi there I was wondering if there is any way to make an event change the passability of it's tile. The idea I have is for the party to be chased by a boss. And for the boss to be collapsing a bridge behind them. I can make tiles move by making a blank area of the map and making a stack of events that use the tileset graphics. But I need the player to be able to move over the area when the event is in one state and not be able to move when the event is in another state. Is this possible? Or is there some workaround?


    Is this even something an addon could do as tile passability seems hard coded into the tileset info.
     
    #1
  2. Wookiee420

    Wookiee420 Veteran Veteran

    Messages:
    294
    Likes Received:
    131
    Location:
    Colorado
    First Language:
    English
    i do not know the proper javalanguage to accomplish this, but i do know that you should look towards Yanfly's Region Restrictions......i am on my phone and far from my computer otherwise i would help you look into it but there should be a way to accomplish it with that and his other "region" plugins
     
    #2
  3. RHachicho

    RHachicho Veteran Veteran

    Messages:
    264
    Likes Received:
    125
    Location:
    Basildon, United Kingdom
    First Language:
    English
    While a very useful plugin .. It doesn't quite do what I need. What I need is to have a tile that is passable become impassable. This addon is great for quality of life stuff for the player .. and for making secret passages. If only there where a way to disable/enable a certain region lock with plugin commands I'd be set.


    Thanks for trying to help though man :)
     
    Last edited by a moderator: Nov 3, 2016
    #3
  4. Dad3353

    Dad3353 Veteran Veteran

    Messages:
    421
    Likes Received:
    108
    Location:
    France
    First Language:
    English
    If the Tile was, in fact, an Event, changing the Event Page would make it possible to have a 'through' Tile become an 'impassible' Tile. I use this for much the same reasons; an apparently broken (so impassible...) bridge becomes passable once mended (I change the conditions to get a different Page which has the 'repaired' graphic, and is passable...).


    Does this help..?
     
    #4
    RHachicho likes this.
  5. Blackyu

    Blackyu Professional Procrastinator and proud to be ! Veteran

    Messages:
    101
    Likes Received:
    331
    Location:
    Inside your wall. Just that.
    First Language:
    French
    Primarily Uses:
    RMVXA
    Also, if you need a tile from your tileset to become impassable after a certain event, you can duplicate the tileset in the database, then modify that certain tile's properties in one of the clones.


    Then, during the event, you can use the 'change tileset' command to change between the passable wall tileset and the impassable wall tileset (or vice-versa if you need the opposite to happen.)


    If they are events, however, I suggest doing as @Dad3353 said and just use a switch to change to a new event page, where the event is labeled as "Same level as the player" instead of "Under the player" (or, again, vice-versa if you need the opposite.)
     
    #5
  6. RHachicho

    RHachicho Veteran Veteran

    Messages:
    264
    Likes Received:
    125
    Location:
    Basildon, United Kingdom
    First Language:
    English
    Dad3353's answer may well be what I have to do It's going to be somewhat tricky as it's not a regular structure and the event needs to move so there's going to be a lot of fenangling involved. I may commission a plugin that works in a similar way to yanfly's region restrictions that adds the functionality to enable and disable a regionID's restrictions through a plugin command. It would be fine if I didn't want to include the effect of the tiles collapsing .. which entails moving the events.


    Switching the tilesets is an extremely bothersome workaround for me too as there are several points along this chase sequence where the boss is going to collapse an area.
     
    Last edited by a moderator: Nov 3, 2016
    #6
  7. Wookiee420

    Wookiee420 Veteran Veteran

    Messages:
    294
    Likes Received:
    131
    Location:
    Colorado
    First Language:
    English
    i wonder if Yanfly himself would be interested in adding that to his plugin
     
    #7
  8. waynee95

    waynee95 Lunatic Coder Veteran

    Messages:
    640
    Likes Received:
    527
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    I just flew over the discussion very quickly.


    I think you can modify regionIDs through script calls. Maybe this can work, if you define a regionID as Player Restrict in the Plugin parameters and then modify through a script call the regionID of the tile. Then the tile should be not passable cause the region blocks the player.


    Here is a plugin that makes it maybe easier to set regionIDs:


    https://github.com/Hikitsune-Red/RED_SetRegionId/blob/master/RED_SetRegionID.js


    Edit: Just tested the idea, it works! Maybe this helps you?
     
    Last edited by a moderator: Nov 3, 2016
    #8
  9. Enthar

    Enthar Veteran Veteran

    Messages:
    47
    Likes Received:
    3
    First Language:
    Dutch
    I'm encountering the same problem.


    with that difference that my tile is from the A tileset. (Water).


    When the character uses a swith, a bridge will raise and let the character cross the water.


    Atm the switch only changes the graphs. The bridge is shown, but is not passable.


    Even if I put the event on "through".


    --> Is this because the watertile is impassable?


    If so, can the passablility changed by a simple event?
     
    #9
  10. Shaz

    Shaz Veteran Veteran

    Messages:
    37,793
    Likes Received:
    11,502
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    You should start your own thread rather than hijacking someone else's.


    If your event is set to Below Characters and Through ON, the player should be able to go over it, regardless of the water tiles underneath.  You would need to show a screenshot of your event so we can see how it's set up, and a screenshot of the tileset with the tab selected that contains the event's sprite.  


    If you do provide those screenshots, I suggest you start your own thread rather than continuing here.
     
    #10
  11. RHachicho

    RHachicho Veteran Veteran

    Messages:
    264
    Likes Received:
    125
    Location:
    Basildon, United Kingdom
    First Language:
    English
    @Waynee95 I actually did manage to get the event working. In much the same way as you describe. From the sound of it Shaz's solution may have been simpler. For some reason the through checkbox on events was a total blindspot for me lol. But I suspect it would have worked. You would have to set the event up so that when a certain switch was pressed all the "tile" events would switch to a new page on a parallel trigger that was no longer through .. Start moving to simulate collapsing terrain. And then play an animation that looks like an explosion or a crumbling of earth or something .. before self switching to a blank. Thanks for the answers. I'm pretty sure I have a handle on how I'm going to do this in the future. 


    Thanks everyone for your informative answers!
     
    Last edited by a moderator: Dec 16, 2016
    #11
  12. Shaz

    Shaz Veteran Veteran

    Messages:
    37,793
    Likes Received:
    11,502
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    why a parallel trigger?


    If you want them to be destroyed gradually, I'd just use events with 2 pages, condition the second page by a variable - the same variable, but increment the numbers (the first one to be destroyed would be variable >= 1, the second one to be destroyed would be variable >= 2, etc).  Then as the monster crosses over the bridge, increment the variable with each step.  If you wanted an animation to show, you could use a single one that's set to target a character's feet, and put the images slightly lower, and play that animation on the monster character rather than the bridge events.  So as it walks over, the crumbling animation would show behind them, and the bridge tiles would disappear.


    Actually, you shouldn't even need THROUGH ON for those events - if you use a tileset image as the event sprite and set the event's priority to Below Characters, I thought it looks at the tile passage settings to determine whether you can go over them or not.
     
    #12

Share This Page