Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_InstigatorContextData Interface Reference

Public Member Functions

bool HasAnyVictimKillerRelation (SCR_ECharacterDeathStatusRelations relation)
 If the relation ship between the killer and victim is the given relation.
 
SCR_ECharacterDeathStatusRelations GetVictimKillerRelation ()
 
SCR_ECharacterControlType GetVictimCharacterControlType ()
 
bool HasAnyVictimCharacterControlType (SCR_ECharacterControlType controlType)
 
SCR_ECharacterControlType GetKillerCharacterControlType ()
 
bool HasAnyKillerCharacterControlType (SCR_ECharacterControlType controlType)
 
int GetVictimPlayerID ()
 
int GetKillerPlayerID ()
 
IEntity GetVictimEntity ()
 
IEntity GetKillerEntity ()
 
Instigator GetInstigator ()
 
SCR_ECharacterDisguiseType GetKillerDisguiseType ()
 
SCR_ECharacterDisguiseType GetVictimDisguiseType ()
 
bool DoesPlayerKillCountAsTeamKill (bool editorKillsCount=false, bool possessedKillsCount=false)
 Method to check wether or not the kill of this context action counts as team killing.
 
bool IsEnemyKillPunished (SCR_EDisguisedKillingPunishment punishmentToCheck, bool editorKillsCount=false, bool checkIfAllFlagsValid=false)
 
void SCR_InstigatorContextData (int victimPlayerID, IEntity victimEntity, IEntity killerEntity, notnull Instigator instigator, bool isDeleted=false)
 This method sets death relation and status based on victim, killer, and instigator entities, considering their control types, faction and if GM or not.
 
void CreateInstigatorData (int victimPlayerID, IEntity victimEntity, IEntity killerEntity, notnull Instigator instigator, bool isDeleted=false)
 This method sets death relation and status based on victim, killer, and instigator entities, considering their control types, faction and if GM or not.
 

Protected Member Functions

void SetPerceivedFaction (int victimPlayerID, IEntity victimEntity, IEntity killerEntity, notnull Instigator instigator, bool isDeleted=false)
 
Faction GetFaction (IEntity entity, int playerID)
 
Faction GetFactionFromPlayerID (int playerID)
 

Protected Attributes

int m_iVictimPlayerID
 
int m_iKillerPlayerID
 
IEntity m_VictimEntity
 
IEntity m_KillerEntity
 
ref Instigator m_Instigator
 
SCR_ECharacterDeathStatusRelations m_eVictimKillerRelation = SCR_ECharacterDeathStatusRelations.UNKNOWN
 
SCR_ECharacterControlType m_eVictimControlType = SCR_ECharacterControlType.UNKNOWN
 
SCR_ECharacterControlType m_eKillerControlType = SCR_ECharacterControlType.UNKNOWN
 
SCR_ECharacterDisguiseType m_eKillerDisguiseType = SCR_ECharacterDisguiseType.DEFAULT_FACTION
 
SCR_ECharacterDisguiseType m_eVictimDisguiseType = SCR_ECharacterDisguiseType.DEFAULT_FACTION
 

Constructor & Destructor Documentation

◆ SCR_InstigatorContextData()

void SCR_InstigatorContextData.SCR_InstigatorContextData ( int victimPlayerID,
IEntity victimEntity,
IEntity killerEntity,
notnull Instigator instigator,
bool isDeleted = false )

This method sets death relation and status based on victim, killer, and instigator entities, considering their control types, faction and if GM or not.

Parameters
[in]victimPlayerIDRepresents the ID of the player who is the victim in the context of this method.
[in]victimEntityThe victimEntity represents the entity killed in the context, which can be a player or an AI character.
[in]killerEntityKiller entity represents the killer in the context of this method, which is used to determine the relationship between the killer and victim
[in]instigatorInstigator To obtain the actual killer and other information about the killer
[in]isDeletedIf isDeleted is true, it represents that the victim entity has been deleted by the editor or other function

Member Function Documentation

◆ CreateInstigatorData()

void SCR_InstigatorContextData.CreateInstigatorData ( int victimPlayerID,
IEntity victimEntity,
IEntity killerEntity,
notnull Instigator instigator,
bool isDeleted = false )

This method sets death relation and status based on victim, killer, and instigator entities, considering their control types, faction and if GM or not.

Parameters
[in]victimPlayerIDRepresents the ID of the player who is the victim in the context of this method.
[in]victimEntityThe victimEntity represents the entity killed in the context, which can be a player or an AI character.
[in]killerEntityKiller entity represents the killer in the context of this method, which is used to determine the relationship between the killer and victim
[in]instigatorInstigator To obtain the actual killer and other information about the killer
[in]isDeletedIf isDeleted is true, it represents that the victim entity has been deleted by the editor or other function

◆ DoesPlayerKillCountAsTeamKill()

bool SCR_InstigatorContextData.DoesPlayerKillCountAsTeamKill ( bool editorKillsCount = false,
bool possessedKillsCount = false )

Method to check wether or not the kill of this context action counts as team killing.

Parameters
[in]editorKillsCountIf true then admins, GMs and players on admin list are not ignored
[in]possessedKillsCountIf true then Kills done while possessing an AI are not ignored
Returns
True if it counts as a team kill

◆ GetFaction()

Faction SCR_InstigatorContextData.GetFaction ( IEntity entity,
int playerID )
protected

◆ GetFactionFromPlayerID()

Faction SCR_InstigatorContextData.GetFactionFromPlayerID ( int playerID)
protected

◆ GetInstigator()

Instigator SCR_InstigatorContextData.GetInstigator ( )
Returns
Returns instigator which holds additional information of the killer

◆ GetKillerCharacterControlType()

SCR_ECharacterControlType SCR_InstigatorContextData.GetKillerCharacterControlType ( )
Returns
The control type of killer. Eg: AI, Player, Possessed AI, GM/Admin

◆ GetKillerDisguiseType()

SCR_ECharacterDisguiseType SCR_InstigatorContextData.GetKillerDisguiseType ( )
Returns
killer disguise type. Which is the relation between the perceived faction and affiliated faction. Will return DEFAULT_FACTION if disabled

◆ GetKillerEntity()

IEntity SCR_InstigatorContextData.GetKillerEntity ( )
Returns
Returns Controlled Entity of killer (Might change if entity was player and changes character)

◆ GetKillerPlayerID()

int SCR_InstigatorContextData.GetKillerPlayerID ( )
Returns
Returns player ID of killer

◆ GetVictimCharacterControlType()

SCR_ECharacterControlType SCR_InstigatorContextData.GetVictimCharacterControlType ( )
Returns
The control type of victim. Eg: AI, Player, Possessed AI, GM/Admin

◆ GetVictimDisguiseType()

SCR_ECharacterDisguiseType SCR_InstigatorContextData.GetVictimDisguiseType ( )
Returns
victim disguise type. Which is the relation between the perceived faction and affiliated faction. Will return DEFAULT_FACTION if disabled

◆ GetVictimEntity()

IEntity SCR_InstigatorContextData.GetVictimEntity ( )
Returns
Returns Controlled Entity of Victim

◆ GetVictimKillerRelation()

SCR_ECharacterDeathStatusRelations SCR_InstigatorContextData.GetVictimKillerRelation ( )
Returns
The relation type between victim and killer. Eg: Suicide, Killed by enemy, killed by GM etc

◆ GetVictimPlayerID()

int SCR_InstigatorContextData.GetVictimPlayerID ( )
Returns
Returns player ID of victim

◆ HasAnyKillerCharacterControlType()

bool SCR_InstigatorContextData.HasAnyKillerCharacterControlType ( SCR_ECharacterControlType controlType)
Parameters
[in]controlTypeControl type to check
Returns
Returns true if killer has any of the give control type flags. Eg: AI, Player, Possessed AI, GM/Admin

◆ HasAnyVictimCharacterControlType()

bool SCR_InstigatorContextData.HasAnyVictimCharacterControlType ( SCR_ECharacterControlType controlType)
Parameters
[in]controlTypeControl type to check
Returns
Returns true if victim has any of the give control type flags. Eg: AI, Player, Possessed AI, GM/Admin

◆ HasAnyVictimKillerRelation()

bool SCR_InstigatorContextData.HasAnyVictimKillerRelation ( SCR_ECharacterDeathStatusRelations relation)

If the relation ship between the killer and victim is the given relation.

Note that this is a flag and it can check multiple relation types at the same time

Parameters
[in]relationRelation (or relations as it is a flag) to check for
Returns
Will return true if any of the given relations is true

◆ IsEnemyKillPunished()

bool SCR_InstigatorContextData.IsEnemyKillPunished ( SCR_EDisguisedKillingPunishment punishmentToCheck,
bool editorKillsCount = false,
bool checkIfAllFlagsValid = false )
Parameters
[in]punishmentToCheckWhich flag(s) are checked to see if the enemy kill is punished
[in]editorKillsCountIf true then admins, GMs and players on admin list are not ignored
[in]checkIfAllFlagsValidWill check all flags are equal to the setting if true. Otherwise if one of them is true the condition will return true
Returns
True if the enemy kill is punished

◆ SetPerceivedFaction()

void SCR_InstigatorContextData.SetPerceivedFaction ( int victimPlayerID,
IEntity victimEntity,
IEntity killerEntity,
notnull Instigator instigator,
bool isDeleted = false )
protected

Member Data Documentation

◆ m_eKillerControlType

SCR_ECharacterControlType SCR_InstigatorContextData.m_eKillerControlType = SCR_ECharacterControlType.UNKNOWN
protected

◆ m_eKillerDisguiseType

SCR_ECharacterDisguiseType SCR_InstigatorContextData.m_eKillerDisguiseType = SCR_ECharacterDisguiseType.DEFAULT_FACTION
protected

◆ m_eVictimControlType

SCR_ECharacterControlType SCR_InstigatorContextData.m_eVictimControlType = SCR_ECharacterControlType.UNKNOWN
protected

◆ m_eVictimDisguiseType

SCR_ECharacterDisguiseType SCR_InstigatorContextData.m_eVictimDisguiseType = SCR_ECharacterDisguiseType.DEFAULT_FACTION
protected

◆ m_eVictimKillerRelation

SCR_ECharacterDeathStatusRelations SCR_InstigatorContextData.m_eVictimKillerRelation = SCR_ECharacterDeathStatusRelations.UNKNOWN
protected

◆ m_iKillerPlayerID

int SCR_InstigatorContextData.m_iKillerPlayerID
protected

◆ m_Instigator

ref Instigator SCR_InstigatorContextData.m_Instigator
protected

◆ m_iVictimPlayerID

int SCR_InstigatorContextData.m_iVictimPlayerID
protected

◆ m_KillerEntity

IEntity SCR_InstigatorContextData.m_KillerEntity
protected

◆ m_VictimEntity

IEntity SCR_InstigatorContextData.m_VictimEntity
protected

The documentation for this interface was generated from the following file: