Save-Point
Check player facing direction - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: Check player facing direction (/thread-133.html)



Check player facing direction - desbrina - 06-18-2010

How do you go about checking what direction the player is currently facing?
Something like

If facing up
do item1
else if facing down
do item2
etc. etc.

I know theres the conditional statement in events, buti'm looking for a script verison of it

Thanks


Check player facing direction - mageone - 06-18-2010

hello

this is in conditional branch, page 3

[Image: facing.png]


Check player facing direction - deValdr - 06-18-2010

$game_player.direction

This will return a number:

2 - down

4 - left

6 - right

8 - up


Check player facing direction - desbrina - 06-20-2010

Thanks Valdred, just what i needed.

mageone - as i said in the first post, i know about conditional branch in events, but i was after a script version


Check player facing direction - mageone - 06-20-2010

hello Desbrina,
my bad, i ve read too fast and skip that, sorry >.<

anyway that's great Valdred has given the answer to you !! :)


Check player facing direction - deValdr - 06-20-2010

If you are ever stuck in scripting or eventing. Just play a tune at this flute.

*hands over magical flute*



*riding into the sunset*