Question about annoying movement problem that makes no sense.

Discussion in 'Javascript/Plugin Support' started by OmnislashXX, Nov 19, 2018.

  1. OmnislashXX

    OmnislashXX Veteran Veteran

    Messages:
    593
    Likes Received:
    3,638
    Location:
    Maryland
    First Language:
    English
    Primarily Uses:
    RMMV
    You heard me. It makes absolutely no sense. Here the picture. [​IMG]

    The guard is supposed to patrol around the table, stopping every so often. But his behavior is totally different. He'll continue to just run straight, bump into the wall and remain there. If I put Through On, he just keeps walking straight. What in gods name am I doing wrong here?!
     
    #1
  2. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,294
    Likes Received:
    4,836
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Set the move route to wait for completion. If not, it will keep repeating the first move route all over again, makes it run straight.
    Besides, why parallel process, not autonomous movement?
     
    #2
    OmnislashXX likes this.
  3. Doktor_Q

    Doktor_Q I'm not a real doktor, but I am a real Q Veteran

    Messages:
    577
    Likes Received:
    321
    Location:
    Denial
    First Language:
    English
    Primarily Uses:
    RMMV
    Because you have the guard as "Type: Fixed", and are setting his movement route via parallel process. There's nothing to stop the process from repeating, so it's just re-assigning his movement route and starting from the first command every single frame.

    What would probably work better is to set his Autonomous Movement type to "Custom" and put your move route in there, and leave the event contents empty. You can also set his Trigger to 'action button' or something that isn't Auto or Parallel- Parallel events are one of the fastest ways to make your game lag, and are prone to producing odd behaviors if you use them carelessly.
     
    #3
    OmnislashXX likes this.
  4. OmnislashXX

    OmnislashXX Veteran Veteran

    Messages:
    593
    Likes Received:
    3,638
    Location:
    Maryland
    First Language:
    English
    Primarily Uses:
    RMMV
    Unfortunately, I need to leave the Custom Route for the Event Chaser Script commands by Yanfly, so the guard chases the player if they get too close. So, I was hoping that Parallel movment route would essentially have the same effect.
     
    #4
  5. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    11,916
    Likes Received:
    12,047
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    You can do both. Put the move route in there, and the event chase. It's worked for me so far.
     
    #5
    OmnislashXX likes this.
  6. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,561
    Likes Received:
    978
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Parallel process means that it runs every frame (60 frames per second). So in your event, you are setting the move route of the guard 60 times per second. Obviously, it can never even do the moves that it is supposed to, because you're overwriting the move route every frame.

    You don't need to set the move route every frame, you just need to set it once. In a different Autorun/Parallel event, set the move route and then use Erase Event.
     
    #6
    OmnislashXX likes this.
  7. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,294
    Likes Received:
    4,836
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Yea but have you tried to put wait for completion as I suggested?
     
    #7
    OmnislashXX likes this.
  8. Doktor_Q

    Doktor_Q I'm not a real doktor, but I am a real Q Veteran

    Messages:
    577
    Likes Received:
    321
    Location:
    Denial
    First Language:
    English
    Primarily Uses:
    RMMV
    As @bgillisp says, you can just put the Yanfly commands at the start of the route- in fact, as you currently have it set up, the chase script won't work, because the route commands will never be run- on account of using a parallel process to set a different move route immediately, and also because with a move route of "Fixed", it will completely ignore the contents of your Custom route.

    The Yanfly commands aren't passive notetags, they're actually commands that need to be executed. This has a funny side-effect of letting you change the enemy's view radius or chase properties at different points along their route.
     
    #8
    OmnislashXX likes this.
  9. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    11,916
    Likes Received:
    12,047
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    RIght. For example I do this all the time in my game, all inside the move route:

    Move at random
    (code for event chase if within x squares of the player).

    I combine that with region blocking to keep the monsters from moving too far away from the zone too.
     
    #9
    OmnislashXX likes this.
  10. OmnislashXX

    OmnislashXX Veteran Veteran

    Messages:
    593
    Likes Received:
    3,638
    Location:
    Maryland
    First Language:
    English
    Primarily Uses:
    RMMV
    Alright. I'll try it as soon as I can get the P.C. back from Dad.
     
    #10
  11. OmnislashXX

    OmnislashXX Veteran Veteran

    Messages:
    593
    Likes Received:
    3,638
    Location:
    Maryland
    First Language:
    English
    Primarily Uses:
    RMMV
    Thank you so much for the advice and allowing me to learn something new. It worked like a charm.
     
    #11
  12. OmnislashXX

    OmnislashXX Veteran Veteran

    Messages:
    593
    Likes Received:
    3,638
    Location:
    Maryland
    First Language:
    English
    Primarily Uses:
    RMMV
    Movement problems again. I have a soldier that follows a different route, but is essentially coded the exact same way as a previous Guard (that works). But this guy runs into the dayum wall every time the player gets caught. Essentially NOT following what I'm telling him to do. I'm pretty frustrated here.
     
    #12
  13. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    11,916
    Likes Received:
    12,047
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    If the player has a wall between them, that is what will happen. That's not a movement route issue, it's just how the chase script is coded. Sometimes they will find a way around it, but not always, as there is no true pathfinding in the system.

    If that is not the issue, post a picture of the move route, but I imagine this time it is more an issue with the plug-in than MV.
     
    #13
  14. OmnislashXX

    OmnislashXX Veteran Veteran

    Messages:
    593
    Likes Received:
    3,638
    Location:
    Maryland
    First Language:
    English
    Primarily Uses:
    RMMV
    It's just supposed to follow a route, then when the players gets caught, the switch resets everything. The player is sent back to square one, the event is sent back to it's original starting place. Except the event just walks into the far wall, or walks down the hall until it can't anymore. But I didn't program it that way.
     
    #14
  15. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,452
    Likes Received:
    4,095
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP
    Then please post a picture of your event.
     
    #15
  16. OmnislashXX

    OmnislashXX Veteran Veteran

    Messages:
    593
    Likes Received:
    3,638
    Location:
    Maryland
    First Language:
    English
    Primarily Uses:
    RMMV
    Sorry, I hadn't actually been on a P.C. since yesterday. Here are the screens.

    [​IMG]

    If caught for the first time, Guard does this and doesn't move until the player walks by catching him again.

    [​IMG]

    I need to reset his route like I did with the previous Guard:

    [​IMG]

    I would just put these autorun events into one dayum event, but THAT messes up the first Guard. I'm seriously at my wits end here.
     
    #16
  17. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    11,916
    Likes Received:
    12,047
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    That looks more like a fault with the pathfinding in the plug-in for chase player than anything. There is no real pathfinding system in RPGMaker, so you will get things like that from time to time. The only solution I know of is to code a true pathfinding system into the engine.

    Or transfer the player to a new map and back. That resets all events unless you got a plug-in to have them save their old position.
     
    #17
  18. OmnislashXX

    OmnislashXX Veteran Veteran

    Messages:
    593
    Likes Received:
    3,638
    Location:
    Maryland
    First Language:
    English
    Primarily Uses:
    RMMV
    So it's basically the plugin's fault. You know, I decided to Copy the common event of the characters being caught, used a different switch for turning it off {as shown by the second picture. } Basically same thing, just different numbers, so that they would be their own events. Did you know that it messed up the first guards path? The code doesn't even try to touch the first guard, yet here I am.
     
    #18
  19. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    11,916
    Likes Received:
    12,047
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    No, it's the fact there is NO pathfinding in RPGMaker. None. Nada. Ziltch. Nein. Get the picture?

    The best way to get the event to reset is to transfer the player to a dummy map and immediately transfer back. That will reset all events as long as you don't have a keep all events in their current location plug-in installed.

    Either way, since this is a plug-in issue, moving to plug-in support.
     
    #19
  20. OmnislashXX

    OmnislashXX Veteran Veteran

    Messages:
    593
    Likes Received:
    3,638
    Location:
    Maryland
    First Language:
    English
    Primarily Uses:
    RMMV
    Huh. Well, okay then. I guess i'll do that then.
     
    #20

Share This Page