tuxemon.event.conditions.player_facing module

class tuxemon.event.conditions.player_facing.PlayerFacingCondition[source]

Bases: EventCondition

Check to see where an NPC is facing.

Script usage

is player_facing <direction>
Script parameters:

direction – One of “up”, “down”, “left” or “right”.

name: ClassVar[str] = 'player_facing'
test(session, condition)[source]

Check to see where the player is facing

Parameters:
  • session (Session) – The session object

  • condition (MapCondition) – The map condition object.

Returns:

Whether the player faces the chosen direction.

Return type:

bool