tuxemon.event.conditions.player_facing_npc module

class tuxemon.event.conditions.player_facing_npc.PlayerFacingNPCCondition[source]

Bases: EventCondition

Check to see the player is next to and facing a particular NPC.

Script usage

is player_facing_npc <character>
Script parameters:

character – Npc slug name (e.g. “npc_maple”).

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

Check to see the player is next to and facing a particular NPC.

Parameters:
  • session (Session) – The session object

  • condition (MapCondition) – The map condition object.

Returns:

Whether the player is facing the chosen character.

Return type:

bool