• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Dawn, Gloria, Juliana, or Summer - 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.

[Script] Getplayerposition

__fred__40

fred
  • 277
    Posts
    5
    Years
    Hi guys
    I need to do a script where based on my position the NPC says something different
    So I looked for it online and found this great tutorial from AspiringPokeTrainer(here is the link, https://www.youtube.com/watch?v=Wx0r1ogko4g )
    However I don't understand which variable should go there where he writes PLAYERFACING,
    for example for LASTTALKED the variable is 0x800D,
    anyone knows?
    Fred
     
    Hi guys
    I need to do a script where based on my position the NPC says something different
    So I looked for it online and found this great tutorial from AspiringPokeTrainer(here is the link, https://www.youtube.com/watch?v=Wx0r1ogko4g )
    However I don't understand which variable should go there where he writes PLAYERFACING,
    for example for LASTTALKED the variable is 0x800D,
    anyone knows?
    Fred

    Variable 0x800D is ''lastresult'', there are a lot of commands that store their value in that variable.
     
    I found the answer in another thread( https://www.pokecommunity.com/threads/377893 ),the variable for PLAYERFACING is 800C

    So the script goes as follows

    #dynamic 0x800000
    #org @start
    lock
    faceplayer
    compare 0x800C 0x3
    if 0x1 goto @left
    msgbox @msg 0x6
    release
    end

    #org @left
    msgbox @msgleft 0x6
    release
    end

    #org @msg
    = You aren't facing left!

    #org @msgleft
    = You are facing left
     
    Back
    Top