• 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.

Events following other events?

  • 2
    Posts
    9
    Years
    • Seen Mar 7, 2016
    Hey guys,
    I'm trying to figure out how to get an event (e.g. a Pikachu sprite) follow another event (NPC trainer) around as the NPC trainer wanders around the map randomly. Is this possible? The adddependency function seems to only attach events to the game_player. It would be super nice to generalize that function to cover either the player or any other event id on the map!

    Best.
     
    It is possible, I implemented this in my game quite successfully, however, I did not use a code or script, but instead use mapping functions and a dozen of conditional branches for it. So say, you have a NPC, record its Map X and Map Y in two variables, do the same for the other event (Pikachu), then use conditional branches to copy the "leading event's" movements. I know this is a bit of a detour route, but if you are not good at scripting, then you will have to think of alternatives.
     
    Back
    Top