Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SCR_VoterComponent Interface Reference
Inheritance diagram for SCR_VoterComponent:
[legend]

Public Member Functions

void Vote (EVotingType type, int value)
 Vote!
 
void RemoveVote (EVotingType type, int value=SCR_VotingBase.DEFAULT_VALUE)
 Remove previously cast vote.
 
void AbstainVote (EVotingType type, int value=SCR_VotingBase.DEFAULT_VALUE)
 Player abstained from voting.
 
bool DidVote (EVotingType type, int value=SCR_VotingBase.DEFAULT_VALUE)
 Check if player did cast the vote.
 
bool HasAbstained (EVotingType type, int value=SCR_VotingBase.DEFAULT_VALUE)
 Check if player abstained from voting.
 
override void OnPostInit (IEntity owner)
 

Static Public Member Functions

static SCR_VoterComponent GetInstance ()
 Get local instance of this component.
 
static void InstantVote ()
 Instantly cast vote to the only ongoing voting.
 
static void InstantRemoveAndAbstainVote ()
 Instantly cast remove vote to the only ongoing voting and will set self to abstaining as well Ignored if number of votings is not exactly 1.
 

Protected Member Functions

void VoteServer (EVotingType type, int value)
 
void RemoveVoteServer (EVotingType type, int value)
 

Protected Attributes

PlayerController m_PlayerController
 

Member Function Documentation

◆ AbstainVote()

void SCR_VoterComponent.AbstainVote ( EVotingType  type,
int  value = SCR_VotingBase::DEFAULT_VALUE 
)

Player abstained from voting.

Eg: Did not vote yes or removes vote yes

Parameters
[in]typeType of the vote
[in]valueVoted value, depends on the type (e.g., for KICK it's player ID)

◆ DidVote()

bool SCR_VoterComponent.DidVote ( EVotingType  type,
int  value = SCR_VotingBase::DEFAULT_VALUE 
)

Check if player did cast the vote.

Parameters
[in]typeType of the vote
[in]valueVoted value, depends on the type (e.g., for KICK it's player ID)
Returns
True if the vote was cast

◆ GetInstance()

static SCR_VoterComponent SCR_VoterComponent.GetInstance ( )
static

Get local instance of this component.

Returns
Local voter component

◆ HasAbstained()

bool SCR_VoterComponent.HasAbstained ( EVotingType  type,
int  value = SCR_VotingBase::DEFAULT_VALUE 
)

Check if player abstained from voting.

Parameters
[in]typeType of the vote
[in]valueVoted value, depends on the type (e.g., for KICK it's player ID)
Returns
True if the player abstained

◆ InstantRemoveAndAbstainVote()

static void SCR_VoterComponent.InstantRemoveAndAbstainVote ( )
static

Instantly cast remove vote to the only ongoing voting and will set self to abstaining as well Ignored if number of votings is not exactly 1.

◆ InstantVote()

static void SCR_VoterComponent.InstantVote ( )
static

Instantly cast vote to the only ongoing voting.

Ignored if number of votings is not exactly 1.

◆ OnPostInit()

override void SCR_VoterComponent.OnPostInit ( IEntity  owner)

◆ RemoveVote()

void SCR_VoterComponent.RemoveVote ( EVotingType  type,
int  value = SCR_VotingBase::DEFAULT_VALUE 
)

Remove previously cast vote.

Parameters
[in]typeType of the vote
[in]valueVoted value, depends on the type (e.g., for KICK it's player ID)

◆ RemoveVoteServer()

void SCR_VoterComponent.RemoveVoteServer ( EVotingType  type,
int  value 
)
protected

◆ Vote()

void SCR_VoterComponent.Vote ( EVotingType  type,
int  value 
)

Vote!

Parameters
[in]typeType of the vote
[in]valueVoted value, depends on the type (e.g., for KICK it's player ID)

◆ VoteServer()

void SCR_VoterComponent.VoteServer ( EVotingType  type,
int  value 
)
protected

Member Data Documentation

◆ m_PlayerController

PlayerController SCR_VoterComponent.m_PlayerController
protected

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