Arma Reforger Script API
|
Public Member Functions | |
void | SetActivationPresence (SCR_EScenarioFrameworkTriggerActivation EActivationPresence) |
Sets Activation Presence. | |
void | SetSpecificClassName (notnull array< string > aClassName) |
Sets specific classnames to be searched in the trigger. | |
void | SetPrefabFilters (notnull array< ref SCR_ScenarioFrameworkPrefabFilter > aPrefabFilter) |
Sets specific prefab filters to be searched in the trigger. | |
void | SetSearchVehicleInventory (bool search) |
Sets if trigger should also search vehicle inventory when looking for prefabs/classnames inside. | |
void | SetOnce (bool bOnce) |
Sets if trigger can be finished just once. | |
void | SetNotificationEnabled (bool notificationEnabled) |
Sets if HUD notifications are enabled. | |
void | SetTriggerConditionsStatus (bool status) |
Sets trigger conditions status. | |
void | SetEnableAudio (bool enableAudio) |
Sets if audio features from this trigger are enabled. | |
void | SetMinimumPlayersNeeded (float minimumPlayersNeededPercentage) |
Sets minimum player percentage needed to finish this trigger. | |
void | SetPlayerActivationNotificationTitle (string sTitle) |
Sets HUD activation notification title. | |
void | SetActivationCountdownTimer (float activationCountdownTimer) |
Sets activation coundown timer. | |
void | SetCountdownAudio (string sAudioName) |
Sets which audio can be played from activating this trigger. | |
void | SetCustomTriggerConditions (array< ref SCR_CustomTriggerConditions > triggerConditions) |
Sets custom trigger conditions. | |
void | SetEntityEnteredActions (array< ref SCR_ScenarioFrameworkActionBase > entityEnteredActions) |
void | SetEntityLefActions (array< ref SCR_ScenarioFrameworkActionBase > entityLefActions) |
void | SetFinishedActions (array< ref SCR_ScenarioFrameworkActionBase > finishedActions) |
void | SetOwnerFaction (FactionKey sFaction) |
Sets faction that "owns" this trigger. | |
bool | IsMaster () |
Returns if this is executed in a server environment. | |
Faction | GetOwnerFaction () |
Returns trigger faction owner. | |
ResourceName | GetCountdownHUD () |
Returns the countdown HUD resource name. | |
float | GetActivationCountdownTimer () |
Returns activation countdown timer. | |
float | GetActivationCountdownTimerTemp () |
Returns activation countdown timer temporary value which is calculated by the trigger but changes over time. | |
float | GetMinimumPlayersNeededPercentage () |
Returns minimum players needed percentage. | |
string | GetPlayerActivationNotificationTitle () |
Returns player activation notification title. | |
bool | GetNotificationEnabled () |
Returns if HUD notifications are enabled. | |
bool | GetTriggerConditionsStatus () |
Returns trigger conditions status. | |
int | GetCountInsideTrigger () |
Returns number of all the entities that are inside this trigger. | |
int | GetCountEntitiesInside () |
Returns all entities that are inside this trigger. | |
int | GetPlayersCountByFaction () |
Returns number of players in game by the faction set for this trigger. | |
int | GetSpecificClassCountInsideTrigger (string className, int targetCount=-1) |
Returns number of specific class that is inside of this trigger. | |
int | GetSpecificPrefabCountInsideTrigger (BaseContainer prefabContainer, int targetCount=-1, bool includeInheritance=false) |
Returns number of specific prefab that is inside of this trigger. | |
int | GetCharacterCountByFactionInsideTrigger (Faction faction, int targetCount=-1) |
Returns number of characters from the selected faction that are inside this trigger. | |
int | GetPlayersCountByFactionInsideTrigger (Faction faction) |
Returns number of players from the selected faction that are inside this trigger. | |
void | GetPlayersByFactionInsideTrigger (notnull out array< IEntity > aOut) |
Returns all the players by the faction set for this trigger. | |
void | GetPlayersByFaction (notnull out array< IEntity > aOut) |
Returns all the players in the game. | |
override bool | ScriptedEntityFilterForQuery (IEntity ent) |
Override this method in inherited class to define a new filter. | |
void | FinishTrigger (IEntity ent) |
Finishes trigger. | |
void | ActivationPresenceConditions () |
Checks activation presesence conditions. | |
void | OnDeactivateCalledLater (IEntity ent) |
void | HandleAudio () |
Checks if trigger conditions are met, plays countdown music if true, stops if false. | |
void | PlayMusic (string sAudio) |
Plays specified audio track, sets countdown music playing flag, and calls RPC. | |
void | StopMusic (string sAudio) |
Stops music with given audio name, also stops countdown music if playing. | |
void | OnChange (IEntity ent) |
ScriptInvoker | GetOnChange () |
void | SetInitSequenceDone (bool init) |
Sets Init sequence as done or not. | |
Public Member Functions inherited from SCR_BaseTriggerEntity | |
ScriptInvoker | GetOnActivate () |
ScriptInvoker | GetOnDeactivate () |
bool | ScriptedEntityFilterForQuery (IEntity ent) |
Override this method in inherited class to define a new filter. This base filter will not be used unless overridden! | |
Public Member Functions inherited from BaseGameTriggerEntity | |
ScriptInvoker | GetOnQueryFinished () |
proto external bool | QueryEntityInside (notnull IEntity ent) |
proto external void | QueryEntitiesInside () |
proto external bool | DefaultEntityFilterForQuery (IEntity ent) |
proto external int | GetEntitiesInside (out notnull array< IEntity > outEntities) |
Get the entities inside the triggers. | |
proto external void | SetSphereRadius (float radius) |
proto external float | GetSphereRadius () |
proto external void | SetUpdateRate (float updateRate) |
proto external float | GetUpdateRate () |
proto external void | EnablePeriodicQueries (bool enable) |
proto external bool | IsPeriodicQueriesEnabled () |
proto external void | AddFilterName (string name) |
Add a name to the filter. | |
proto external bool | RemoveFilterName (string name) |
Remove a name from the filter. | |
proto external void | AddClassType (TypeName classType) |
Add a class type to the filter. | |
proto external bool | RemoveClassType (TypeName classType) |
Remove a class type from the filter. | |
proto external void | AddPrefabFilter (PrefabFilter prefabFilter) |
Add a prefab filter to the filters. | |
proto external bool | RemovePrefabFilter (PrefabFilter prefabFilter) |
Remove a prefab filter from the filters. | |
proto external EQueryEntitiesFlags | GetTraceMask () |
Get flag(s) from the traces done by the the trigger. | |
proto external void | SetTraceMask (EQueryEntitiesFlags flags) |
Sets trace mask. | |
proto external void | ClearTraceMask (EQueryEntitiesFlags flags) |
Clears trace mask. | |
Public Attributes | |
ref array< ref SCR_ScenarioFrameworkActionBase > | m_aEntityEnteredActions |
ref array< ref SCR_ScenarioFrameworkActionBase > | m_aEntityLeftActions |
ref array< ref SCR_ScenarioFrameworkActionBase > | m_aFinishedActions |
Static Public Attributes | |
static ref ScriptInvokerBase< ScriptInvokerTriggerUpdated > | s_OnTriggerUpdated = new ScriptInvokerBase<ScriptInvokerTriggerUpdated>() |
static ref ScriptInvokerInt | s_OnTriggerUpdatedPlayerNotPresent = new ScriptInvokerInt() |
Protected Member Functions | |
void | CustomTriggerConditions () |
This method handles custom conditions. | |
void | HandleNetworkComponentForPlayersInside (IEntity ent) |
Handles players inside the trigger or those who left it. | |
void | ProcessPlayerNetworkComponent (IEntity entity, bool leftTrigger=false) |
Processes the entity and its Network component to replicate only for each player inside the trigger. | |
void | HandleTimer () |
Handles if timer should be ticking or not. | |
void | UpdateTimer () |
Updates the timer value and passes info to HUD. | |
override void | OnActivate (IEntity ent) |
override void | OnQueryFinished (bool bIsEmpty) |
override void | OnDeactivate (IEntity ent) |
void | RpcDo_PlayMusic (string sAudio) |
Plays specified audio in music manager if available. | |
void | RpcDo_StopMusic (string sAudio) |
Stops music with given audio name. | |
override void | EOnInit (IEntity owner) |
Initializes the trigger. | |
Protected Member Functions inherited from SCR_BaseTriggerEntity | |
bool | IsAlive (IEntity entity) |
override void | OnActivate (IEntity ent) |
callback - activation - occurs when and entity which fulfills the filter definitions enters the Trigger | |
override void | OnDeactivate (IEntity ent) |
callback - deactivation - occurs when and entity which was activated (OnActivate) leaves the Trigger | |
Protected Member Functions inherited from ScriptedGameTriggerEntity | |
void | OnInit (IEntity owner) |
void | OnFrame (IEntity owner, float timeSlice) |
void | OnActivate (IEntity ent) |
callback - activation - occurs when and entity which fulfills the filter definitions enters the Trigger | |
void | OnDeactivate (IEntity ent) |
callback - deactivation - occurs when and entity which was activated (OnActivate) leaves the Trigger | |
void | OnQueryFinished (bool bIsEmpty) |
callback - query finished - occurs when the current query finished being processd and has updated results | |
void SCR_ScenarioFrameworkTriggerEntity.ActivationPresenceConditions | ( | ) |
Checks activation presesence conditions.
|
protected |
This method handles custom conditions.
|
protected |
Initializes the trigger.
void SCR_ScenarioFrameworkTriggerEntity.FinishTrigger | ( | IEntity | ent | ) |
Finishes trigger.
float SCR_ScenarioFrameworkTriggerEntity.GetActivationCountdownTimer | ( | ) |
Returns activation countdown timer.
float SCR_ScenarioFrameworkTriggerEntity.GetActivationCountdownTimerTemp | ( | ) |
Returns activation countdown timer temporary value which is calculated by the trigger but changes over time.
int SCR_ScenarioFrameworkTriggerEntity.GetCharacterCountByFactionInsideTrigger | ( | Faction | faction, |
int | targetCount = -1 |
||
) |
Returns number of characters from the selected faction that are inside this trigger.
ResourceName SCR_ScenarioFrameworkTriggerEntity.GetCountdownHUD | ( | ) |
Returns the countdown HUD resource name.
int SCR_ScenarioFrameworkTriggerEntity.GetCountEntitiesInside | ( | ) |
Returns all entities that are inside this trigger.
int SCR_ScenarioFrameworkTriggerEntity.GetCountInsideTrigger | ( | ) |
Returns number of all the entities that are inside this trigger.
float SCR_ScenarioFrameworkTriggerEntity.GetMinimumPlayersNeededPercentage | ( | ) |
Returns minimum players needed percentage.
bool SCR_ScenarioFrameworkTriggerEntity.GetNotificationEnabled | ( | ) |
Returns if HUD notifications are enabled.
ScriptInvoker SCR_ScenarioFrameworkTriggerEntity.GetOnChange | ( | ) |
Faction SCR_ScenarioFrameworkTriggerEntity.GetOwnerFaction | ( | ) |
Returns trigger faction owner.
string SCR_ScenarioFrameworkTriggerEntity.GetPlayerActivationNotificationTitle | ( | ) |
Returns player activation notification title.
void SCR_ScenarioFrameworkTriggerEntity.GetPlayersByFaction | ( | notnull out array< IEntity > | aOut | ) |
Returns all the players in the game.
void SCR_ScenarioFrameworkTriggerEntity.GetPlayersByFactionInsideTrigger | ( | notnull out array< IEntity > | aOut | ) |
Returns all the players by the faction set for this trigger.
int SCR_ScenarioFrameworkTriggerEntity.GetPlayersCountByFaction | ( | ) |
Returns number of players in game by the faction set for this trigger.
int SCR_ScenarioFrameworkTriggerEntity.GetPlayersCountByFactionInsideTrigger | ( | Faction | faction | ) |
Returns number of players from the selected faction that are inside this trigger.
int SCR_ScenarioFrameworkTriggerEntity.GetSpecificClassCountInsideTrigger | ( | string | className, |
int | targetCount = -1 |
||
) |
Returns number of specific class that is inside of this trigger.
int SCR_ScenarioFrameworkTriggerEntity.GetSpecificPrefabCountInsideTrigger | ( | BaseContainer | prefabContainer, |
int | targetCount = -1 , |
||
bool | includeInheritance = false |
||
) |
Returns number of specific prefab that is inside of this trigger.
bool SCR_ScenarioFrameworkTriggerEntity.GetTriggerConditionsStatus | ( | ) |
Returns trigger conditions status.
void SCR_ScenarioFrameworkTriggerEntity.HandleAudio | ( | ) |
Checks if trigger conditions are met, plays countdown music if true, stops if false.
|
protected |
Handles players inside the trigger or those who left it.
|
protected |
Handles if timer should be ticking or not.
bool SCR_ScenarioFrameworkTriggerEntity.IsMaster | ( | ) |
Returns if this is executed in a server environment.
|
protected |
[in] | ent | Entity reference for the object being activated. |
Implements SCR_BaseTriggerEntity.
void SCR_ScenarioFrameworkTriggerEntity.OnChange | ( | IEntity | ent | ) |
[in] | ent | Entity ent is an input parameter representing an entity in the game world that triggers the method's action when its state changes |
|
protected |
[in] | ent | Entity reference representing the object being deactivated. |
Implements SCR_BaseTriggerEntity.
void SCR_ScenarioFrameworkTriggerEntity.OnDeactivateCalledLater | ( | IEntity | ent | ) |
[in] | ent | The ent represents an entity inside the method, which is removed from the list of players inside when the method is called. |
|
protected |
[in] | bIsEmpty | Checks if query is empty, if true, returns without further action processing the trigger. |
Implements BaseGameTriggerEntity.
void SCR_ScenarioFrameworkTriggerEntity.PlayMusic | ( | string | sAudio | ) |
Plays specified audio track, sets countdown music playing flag, and calls RPC.
[in] | sAudio | is the name of the music file to play. |
|
protected |
Processes the entity and its Network component to replicate only for each player inside the trigger.
|
protected |
Plays specified audio in music manager if available.
[in] | sAudio | is the name of the music file to play. |
|
protected |
Stops music with given audio name.
[in] | sAudio | is the name of the music track to stop playing. |
override bool SCR_ScenarioFrameworkTriggerEntity.ScriptedEntityFilterForQuery | ( | IEntity | ent | ) |
Override this method in inherited class to define a new filter.
Implements ScriptedGameTriggerEntity.
void SCR_ScenarioFrameworkTriggerEntity.SetActivationCountdownTimer | ( | float | activationCountdownTimer | ) |
Sets activation coundown timer.
void SCR_ScenarioFrameworkTriggerEntity.SetActivationPresence | ( | SCR_EScenarioFrameworkTriggerActivation | EActivationPresence | ) |
Sets Activation Presence.
void SCR_ScenarioFrameworkTriggerEntity.SetCountdownAudio | ( | string | sAudioName | ) |
Sets which audio can be played from activating this trigger.
void SCR_ScenarioFrameworkTriggerEntity.SetCustomTriggerConditions | ( | array< ref SCR_CustomTriggerConditions > | triggerConditions | ) |
Sets custom trigger conditions.
void SCR_ScenarioFrameworkTriggerEntity.SetEnableAudio | ( | bool | enableAudio | ) |
Sets if audio features from this trigger are enabled.
void SCR_ScenarioFrameworkTriggerEntity.SetEntityEnteredActions | ( | array< ref SCR_ScenarioFrameworkActionBase > | entityEnteredActions | ) |
[in] | entityEnteredActions | Array of actions triggered when an entity entered the trigger. |
void SCR_ScenarioFrameworkTriggerEntity.SetEntityLefActions | ( | array< ref SCR_ScenarioFrameworkActionBase > | entityLefActions | ) |
[in] | entityEnteredActions | Array of actions triggered when an entity left the trigger. |
void SCR_ScenarioFrameworkTriggerEntity.SetFinishedActions | ( | array< ref SCR_ScenarioFrameworkActionBase > | finishedActions | ) |
[in] | entityEnteredActions | Array of actions triggered when trigger is finished. |
void SCR_ScenarioFrameworkTriggerEntity.SetInitSequenceDone | ( | bool | init | ) |
Sets Init sequence as done or not.
void SCR_ScenarioFrameworkTriggerEntity.SetMinimumPlayersNeeded | ( | float | minimumPlayersNeededPercentage | ) |
Sets minimum player percentage needed to finish this trigger.
void SCR_ScenarioFrameworkTriggerEntity.SetNotificationEnabled | ( | bool | notificationEnabled | ) |
Sets if HUD notifications are enabled.
void SCR_ScenarioFrameworkTriggerEntity.SetOnce | ( | bool | bOnce | ) |
Sets if trigger can be finished just once.
void SCR_ScenarioFrameworkTriggerEntity.SetOwnerFaction | ( | FactionKey | sFaction | ) |
Sets faction that "owns" this trigger.
void SCR_ScenarioFrameworkTriggerEntity.SetPlayerActivationNotificationTitle | ( | string | sTitle | ) |
Sets HUD activation notification title.
void SCR_ScenarioFrameworkTriggerEntity.SetPrefabFilters | ( | notnull array< ref SCR_ScenarioFrameworkPrefabFilter > | aPrefabFilter | ) |
Sets specific prefab filters to be searched in the trigger.
void SCR_ScenarioFrameworkTriggerEntity.SetSearchVehicleInventory | ( | bool | search | ) |
Sets if trigger should also search vehicle inventory when looking for prefabs/classnames inside.
void SCR_ScenarioFrameworkTriggerEntity.SetSpecificClassName | ( | notnull array< string > | aClassName | ) |
Sets specific classnames to be searched in the trigger.
void SCR_ScenarioFrameworkTriggerEntity.SetTriggerConditionsStatus | ( | bool | status | ) |
Sets trigger conditions status.
void SCR_ScenarioFrameworkTriggerEntity.StopMusic | ( | string | sAudio | ) |
Stops music with given audio name, also stops countdown music if playing.
[in] | sAudio | is the name of the music track to stop playing. |
|
protected |
Updates the timer value and passes info to HUD.
|
protected |
|
protected |
ref array<ref SCR_ScenarioFrameworkActionBase> SCR_ScenarioFrameworkTriggerEntity.m_aEntityEnteredActions |
ref array<ref SCR_ScenarioFrameworkActionBase> SCR_ScenarioFrameworkTriggerEntity.m_aEntityLeftActions |
ref array<ref SCR_ScenarioFrameworkActionBase> SCR_ScenarioFrameworkTriggerEntity.m_aFinishedActions |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |