• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
8
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.
     
    67
    Posts
    12
    Years
  • 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