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.
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.
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.
----- Scripting ------>
🤔
... I'll just, show myself out now.