If (faceleft || facedown) [ do something] (solved)

hi guys.


How simply make a clean conditional with 2 condition.


Face direction left or || face direction down inside conditional branch


Tank you
You're going to have to make a two conditional branches if you don't want to do it via scripting. Conditional branches can't do AND and OR with eventing unless you do it via a script conditional.
You're going to have to make a two conditional branches if you don't want to do it via scripting. Conditional branches can't do AND and OR with eventing unless you do it via a script conditional.

yes we can 


But i need to found i way to get direction of player
Where can you do AND and OR in the conditional branch for eventing?


Character directions are on tab 3, where it says "Character <dropdown> is facing <dropdown>". You can pick the player or an event and any of the 4 directions.
Do you mean_


"If Player is facing down


Else


If Player is facing left"?


Because I know how to do that, I had to use it a few times in my game. It's basically what @Zalerinian said above, but you check the else box and the repeat the above but with another direction.
Conditional Branch: Script: $gamePlayer.direction() === 2 || $gamePlayer.direction() === 4
ok guys i found the good way.


Inside conditional branch juste add


$gamePlayer._direction == 4 || $gamePlayer._direction == 2


Left= 6
Bottom= 2
Rigth= 4
Up 8


i found it in 
 


console.log('direction ' + $gamePlayer._direction);






So the result is this


◆Si:Script:$gamePlayer._direction == 4 || $gamePlayer._direction == 2
  ◆



:Fin


Tank you
yep, but you'd normally use the function to get it rather than refer to the internal property.


So $gamePlayer.direction() rather than $gamePlayer._direction


It's good programming practice, and keeps the "black box" nature of the classes intact, so you reduce the risk of your code breaking if they suddenly decide to change the name or how it's saved.
yep, but you'd normally use the function to get it rather than refer to the internal property.


So $gamePlayer.direction() rather than $gamePlayer._direction


It's good programming practice, and keeps the "black box" nature of the classes intact, so you reduce the risk of your code breaking if they suddenly decide to change the name or how it's saved.

ok  is good to know tanks you @Shaz
----- Scripting ------>


            🤔


... I'll just, show myself out now.

Original thread: https://forums.rpgmakerweb.com/threads/if-faceleft-facedown-do-something-solved.67235/