• 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!
  • Akari, Selene, Mint, Solana - 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.

Having NPCs appear next to the player

  • 53
    Posts
    9
    Years
    Hello again!

    Since I implemented criminal elements in my game (pickpocketing and lockpicking, for example), from which players can profit, I also want to balance things by having a punishing aspect to crimes. One way that comes to mind is the police or something similar to it.
    Thus I wanted to ask if there was a way to have an NPC (or multiple NPCs) appear next to the player, without knowing the exact location of the player at that time.

    Example:
    You try to pickpocket someone but fail. Your failure triggers another event, which counts down a certain amount of time (say a couple of minutes), during which you can continue to play as usual (and possibly try to leave the area in which you failed to rob someone). Once the time has run out, the police appears next to the player and something happens (possibly a fight, for example).
    Can you do that? And if so, how?
    I only know of events similar to the rival appearing, but in those cases you know exactly where the player is, since the event starts on a certain spot. But can you do the same thing without a "set in stone location"?

    One solution I thought might work was making an empty "FollowingPokemon" Event which you then exchange with the police officer. But

    1. I might want to have more than 1 police guy appear,
    2. that would, to my knowledge, only work on the map on which you placed said event, meaning, that you would have to make such an event in at least every city, which then again would result in you having, sooner or later, a huge load of empty events following you,
    3. I was hoping there is a more "sophisticated" way to solve this ^^

    Thank you very much for your assistance in advance! :)
     
    Well, first, thank you for the link, it helps a little. Unfortunately though, the last event I add overwrites every other event placed beforehand, thus, if I try to have 3 NPCs appear, only the 3rd appears.

    Also, if the player is currently looking at some sort of obstacle (another NPC, a tree, a wall, etc.), the event just appears on top of that, which looks, of course, quite strange. The same applies, naturally, if I would, for example, set the coordinates to a different value (say, not next to the player, but rather a few steps away) and on that very spot is some kind of obstacle (as above).

    Does anyone know of a way to circumvent those said issues?
     
    Last edited:
    Back
    Top