tuxemon.event.conditions.npc_facing module

class tuxemon.event.conditions.npc_facing.NPCFacingCondition[source]

Bases: EventCondition

Check to see where a character is facing.

Script usage

is npc_facing <character>,<direction>
Script parameters:
  • character – Either “player” or npc slug name (e.g. “npc_maple”).

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

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

Check to see where a character is facing.

Parameters:
  • session (Session) – The session object

  • condition (MapCondition) – The map condition object.

Returns:

Whether the chosen character faces the chosen direction.

Return type:

bool