• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Scottie, Todd, Serena, Kris - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Implementing the Farfetch'd Hunt from HGSS?

  • 6
    Posts
    9
    Years
    • Seen Jul 31, 2016
    Hello! I'm trying to remake HGSS with a Gen V/VI gang to learn how to code, and I was hoping someone could tell me what I'm doing wrong with my code?

    After getting your second badge in HGSS from Bugsy, you still need the Cut HM to progress through Ilex Forest. You get this by chasing a NPC's Farfetch'd around. It will run away from you if you interact with it, and you have to talk to it from behind for it to be considered successfully caught.

    I'm trying to use a modified script from the default map files for the boulder pushing position check. I set up a parallel process that updates variables 26 and 27 with the player's XY coordinates on the map, and then I put a Farfetch'd event that is triggered by talking with it. If you're standing on a certain spot of the map, it moves Farfetch'd away from you on a move route, and tells it to face you. If you move over rustling grass, it tells Farfetch'd to look in that direction. If you talk to Farfetch'd from behind, it sets its self switch A = true, sets the switch for the cut HM quest complete = true, and goes to a separate event page with no graphic.

    That's my plan, at least. I've found that after my first instance of talking with Farfetch'd, it runs away, but I can't talk with it anymore! It still has collision size, but the action trigger button doesn't work. I don't know any Ruby, and was wondering if it was feasible for me to simply set up ~20-30 conditional branches to check for each location Farfetch'd and the trainer could possibly be interacting, and to move Farfetch'd accordingly. I would appreciate any help in getting Farfetch'd to respond after first talking with it, and feedback for if there's an easier way to code what I'm suggesting. Is it correct to track the player and Farfetch'd events with a parallel process event that sets their locations to a variable?

    Related Video: Youtube, sorry I can't post links :X watch?v=ZKT_PRTiN68

    Thank you!


    Code:

    Parallel Process:

    @>Control Variables: [0026: Player X Coordinate] = Player's Map X
    @>Control Variables: [0027: Player Y Coordinate] = Player's Map Y
    @>Control Variables: [0028: Farfetch X Coordinate] = [Farfetch'd Event]'s Map X
    @>Control Variables: [0029: Farfetch Coordinate] = [Farfetch'd Event]'s Map Y

    For getting Farfetch'd to run away:

    Name: Farfetch'd Event (EV003)

    @>Conditional Branch: Variable [0026: Player X Coordinate] = 28 (Farfetch's initial location)
    @>Conditional Branch: Variable [0026: Player Y Coordinate] = 50 (Farfetch's initial location)
    @>Wait: 8 frame(s)
    @> Play SE: '083Cry', 80, 100
    @> Set Move Route: This event
    $>:Move Right
    $>:Move Right
    $>:Move Right
    $>:Move Right
    $>:Move Right
    $>:Move Right
    $>:Move Right
    Branch End
    Branch End

    For getting Farfetch'd to turn in response to grass rustling, I did a parallel process for the player

    Name: Stepped on Branch

    @>Conditional Branch: Variable [0028: Player X Coordinate] = 35 (where there's a rustle patch)
    @>Conditional Branch: Variable [0029: Player Y Coordinate] = 51 (where there's a rustle patch)
    @>Wait: 8 frame(s)
    @> Play SE: 'Knock', 80, 100
    @> Set Move Route: Farfetch'd Event (003)
    $>:Turn Down
    Branch End
    Branch End

    For ending the event, I wanted to set it up as if Farfetch'd is at (X, Y) and the player is at (X - 1, Y) or (X, Y - 1), turn on the switch for complete and make the event invisible on a new page.
     
    Back
    Top