PlayerModel()

the class that represents all non local players

Members

$gamePlayer :MATTIE.multiplayer.Secondary_Player

actorId

the actor id this player should use

battleOnlyMembers

battle members that only appear in battle

canBeInteractedWith

whether this player can be interacted with or not.

followerIds

the actor ids of any and all followers, -1 if not present

isMarriageHost

whether this player is the host of a marriage

isMarried

whether this play is part of a marriage

marriageHost

the peerid of the host of this marriage

marriageSetup

whether marriage has been initalized or not

marriedTo

an array of all peerId's this player is married to

name

a username

peerId

the id of the peer this player is hosted on

pvpCombatArr

an array of all player's ids who currently in combat with this player

troopInCombatWith

the troopod this peer is currently incombat with

Methods

addIdToPvp()

add an id to the pvp arr if it does not already exist

clearPvpArr()

remove all values from the pvp arr

getFollowers(ids)

set the followers on the playermodel and the $gamePlayer

Parameters:
Name Type Description
ids Array.<int>

the actor ids of any and all followers, -1 if not present

isOnMap() → {bool}

check if this player is on the map

Returns:
bool -

if this player is on the map

memberIds()

get the ids of the actors in this party

removeIdFromPvp()

remove an id from the pvp arr if it exists