Need a little help with ScriptCalls and Party members

Discussion in 'RPG Maker MV' started by Nerdpago, Jan 31, 2019.

  1. Nerdpago

    Nerdpago Maker Member

    Messages:
    6
    Likes Received:
    2
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    Hello, so i want to know if exist a script call that allow to identify if a specified party member is on a especified region
    For example, if the second party member is on region id 60 , change his image
    OR if if the second party member is on a especified map region "X and Y" change his image

    Could be a plugin too...if someone need more details just let me know

    Pls help me guys
     
    #1
  2. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    726
    Likes Received:
    258
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Hi!
    With this you can check in a conditional branch, each region your party members will be:


    ◆If:Script:$gamePlayer._followers.follower(0).regionId() == 1

    :End

    Follower 0 is the second actor in your menu status.
    Now, we need to figure out how we can change the image of the follower (which is the second actor in the menu)
     
    #2
    Nerdpago likes this.
  3. Andar

    Andar Veteran Veteran

    Messages:
    28,413
    Likes Received:
    6,480
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Just get its actor ID (for example by control variable) and then use change actor grafic on it.

    However, the biggest problem is something else @Nerdpago
    Checking and changing every actor and follower picture on the fly is NOT neglectable work, it has a high chance of creating a lot of lag.
    This counts especially if it is done by parallel process.

    So can you tell us for what you want that info and how you plan to use it?
    Because without that info any general answer has a high chance of breaking or lagging your game.
     
    #3
    Nerdpago likes this.
  4. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    726
    Likes Received:
    258
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Have no idea how to do this.
    I mean, i think we need to check the follower, than check which actor id belong to this follower, then change his image.
    But in the codes, i dont know.

    I have tried this, but not work.
    Code:
    $gameParty.members()[0].setCharacterImage(Monster, 1);
    
    $gameParty.members()[0]._actorId.setCharacterImage('Monster', 1);
    
    $gamePlayer._followers.follower(0).setCharacterImage('Monster', 1);
    
    
    But i get to this:
    ◆If:Script:$gamePlayer._followers.follower(0).regionId() == 1
    ◆Control Variables:#0020 = Actor ID of the party member #2
    ◆Script:$gameActors.actor($gameVariables.value(20)).setCharacterImage("Monster", 1);
    : :$gamePlayer.refresh();

    :End

    [EDIT] It worked! I do a mistake with the trigger event xD
    but worked!
     
    Last edited: Jan 31, 2019
    #4
    Nerdpago likes this.
  5. Andar

    Andar Veteran Veteran

    Messages:
    28,413
    Likes Received:
    6,480
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    why use a script here - that is what the event command change actor graphics should do automatically
     
    #5
  6. Nerdpago

    Nerdpago Maker Member

    Messages:
    6
    Likes Received:
    2
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    Thank you so much guys, especialy @Eliaquim , it worked FINE and no Lag detected !
    Just more one question, can i use a script call to detect if the especified follower is moving ?
    it would be perfect if i can use a condition like that
    its like "If : second follower is on region ID "X" and If: second follower is "Idle"
     
    #6
    Eliaquim likes this.
  7. Andar

    Andar Veteran Veteran

    Messages:
    28,413
    Likes Received:
    6,480
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Followers only move when the party as a complete one moves.
    Sometimes it might look as if they aren't moving if the main player had been moving back and forth, but to the engine itself that still counts as moving.
    you would have to implement an entirely new check as to how position changes, and that would really be problematic for lag due to how many checks it would need compared to how often that really happens.
     
    #7
    Eliaquim likes this.
  8. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    726
    Likes Received:
    258
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Not sure about the follower. But, the follower only moves if the player moves, right?
    So if we put a condition that we use if the player moves, instead of follower?
    That will help?
     
    #8
  9. Nerdpago

    Nerdpago Maker Member

    Messages:
    6
    Likes Received:
    2
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    Assuming I can move the followers independently from The player, yet I would not be able to, by some script call or even plug-in, detect if the specific follower is on the move? If not possible, I have no more questions, you guys already helped me a lot, thanks
     
    #9
  10. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    726
    Likes Received:
    258
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    There's some plugins for move tje followers. Search for hime works follower, TYR follower and have other too...
    Just put in google RPG MAKER MV FOLLOWER PLUGIN
     
    #10
    Nerdpago likes this.

Share This Page