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

[Script] Getplayerposition

__fred__40

fred
277
Posts
4
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
 
760
Posts
15
Years
  • Seen today
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.
 
760
Posts
15
Years
  • Seen today
So should i use 800D also for Playerfacing?

Don't know about that command, I mostly use getplayerpos to get the player's position, store the outcome in var 0x4000 and 0x4001 and then compare those to check where the player is standing.
That probably only works for static NPC's, but that's all I ever needed.
 

__fred__40

fred
277
Posts
4
Years
Don't know about that command, I mostly use getplayerpos to get the player's position, store the outcome in var 0x4000 and 0x4001 and then compare those to check where the player is standing.
That probably only works for static NPC's, but that's all I ever needed.
ok
thanks kalarie
 

__fred__40

fred
277
Posts
4
Years
I found the answer in another thread( https://www.pokecommunity.com/showthread.php?t=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