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

[Coding Tutorial] An easy way to create rotating NPCs

11
Posts
4
Years
  • This tutorial has been made with Essentials v19.1. While the chances of the functions we'll be working with being modified with v20 or future versions are very low, I'll keep an eye on it. If I ever notice any modification, I'll try to get this tutorial up to date as soon as possible

    I don't ask for any credits, because what I do is basically just taking an already existing function and creating new ones based on it.

    Introduction :
    What is a rotating NPC ? Basically, this term is associated with NPCs that stay on the same tile, but randomly change the direction they are facing. In the mainline games, this behaviour is pretty often adopted by trainers who can suddendly look at where the player is, and then engaging a battle.

    This is exactly what I'm gonna teach you to do in this tutorial.


    Getting started :
    Spoiler:


    Randomly facing 2 directions :
    Spoiler:


    Randomly facing 3 directions :
    Spoiler:


    Assigning a function to an NPC :
    Spoiler:


    That's all for this tutorial! If something isn't clear, or if you want more explainations, please feel free to ask anything on this thread, and I'll try to respond as fast as possible.
    Also, I'm sorry if you spotted some mistakes. As a resident of Baguette-Land, English is not my native language, and I can make some oopsies sometimes, but I try to be as understandable as possible.
    Thank you for following this tutorial!

    ChromusSama
     
    Last edited:
    Back
    Top