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

[Other] Is there a command like 'compare PLAYERFACING' in XSE?

TheShinyHaxorus

Pokéchu
10
Posts
8
Years
  • Hey, guys. I'm well into learning XSE, but I've yet to come across a command that does the same thing in XSE as 'compare FLAYERFACING' does in pksv-ui. Basically, I want to be able to check the player's direction so that I can see from what side the player is talking to an NPC. This is because I want to be able to make sure sprites of other NPCs moving during cut scenes don't clip through the player if the player can have multiple places in the cutscene (EX: you talk to prof. oak and he walks over to get pokedexes, but you're in his path 1 out of 4 times. I want to be able to have multiple scenarios in the script to prevent him from ever taking the path you're on).

    I'm also looking for a command that lets you check the actual position on a map of the player so that if you step on one out of a couple of ground script tiles in a line that makes another sprite walk over to you, the sprite will pinpoint your position and walk to the tile over your player's position.

    I guess you could really use the second command for both purposes, but if there's a command like the first one too, that's nice too.

    *NOTE*
    I checked diegoisawesome's XSE tutorial, but to no avail. Maybe I just missed it, but I scrolled through it multiple times to try to find it and used CTRL+F to search for 'checkplayerpos' and stuff like that hoping to guess the command name and find it. Didn't work. If anyone could help, I'd be incredibly grateful.

    Thank you to anyone who helps. It's much appreciated.
     
    3,830
    Posts
    14
    Years
    • Age 27
    • OH
    • Seen May 10, 2024
    In this case, XSE has the exact same format as PKSV. You can use "compare PLAYERFACING" along with constants FACE_DOWN, FACE_UP, FACE_LEFT, and FACE_RIGHT to compare the direction the player is facing.

    In case you didn't know, PLAYERFACING has a value of 0x800C and the valid directions are 1 through 4. These can be found in XSE's std.rbh file.
     
    Back
    Top