Script call to restrict player based on player location?

Discussion in 'RPG Maker MV' started by Tea's Jams, Aug 8, 2018.

  1. Tea's Jams

    Tea's Jams I'm human Veteran

    Messages:
    776
    Likes Received:
    1,962
    First Language:
    English
    Primarily Uses:
    RMMV
    So, I searched the forums a bit and can't seem to find the right answer (although I'm positive it's buried somewhere in here... sigh)

    Anyway, I would like to use a plugin that breaks Yanfly's region restrict. I'm hoping to do something to resolve the issue it creates for a game that already has hundreds... if not thousands of doodads.

    I would like to use a player location parallel event (I need no help with that, I got it working great) and (I'm assuming) a script call to restrict player movement when they touch a certain region, only within that region.

    So if my player is walking around the map, I want to block access to all tiles with region 4 (for example) over them.

    Alternately, I would also like to allow passibility based on a specific region in the same fashion (obviously a different script call though, haha)

    Is this possible?

    P.S. Using just the vanilla move route I can make the player go back a step when touching the region, but it just looks and feels weird.
     
    #1
  2. SwiftSign

    SwiftSign Veteran Veteran

    Messages:
    184
    Likes Received:
    45
    First Language:
    English
    Primarily Uses:
    RMMV
    #2
    Tea's Jams likes this.
  3. Tea's Jams

    Tea's Jams I'm human Veteran

    Messages:
    776
    Likes Received:
    1,962
    First Language:
    English
    Primarily Uses:
    RMMV
    Thank you very much for that. I may have to try that if no script call exists. Also I wonder, if this plugin breaks region restrictions, would it also break common events? I don't know.

    I am hoping that if there is a script call that works for this though, that someone sees this thread and tells me. I like to avoid using plugins wherever possible.
     
    #3
  4. Andar

    Andar Veteran Veteran

    Messages:
    28,627
    Likes Received:
    6,573
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    there is no such script call - can't be due to the way computers process data.
    the only thing you could do is the same as used with the other plugins: redirecting the move check to a plugin and modifying it. but that requires a programming override by plugin, it can't be done with a simple script call.

    because basically, when a move command is given the computer checks if the next tile in that direction is passable or not. That is a series of data checks based on map and current position, and you could redirect that to add your own additional checks. but a script call can't change this series...
     
    #4
    Tea's Jams likes this.
  5. Tea's Jams

    Tea's Jams I'm human Veteran

    Messages:
    776
    Likes Received:
    1,962
    First Language:
    English
    Primarily Uses:
    RMMV
    Ok, thank you so much for that clear and comprehensive answer, I really appreciate it. :)
     
    #5

Share This Page