Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_EditorLessThenCountWaypointsActionCondition.c
Go to the documentation of this file.
1 [BaseContainerProps(), BaseContainerCustomStringTitleField("Have less or equal to waypoint count")]
4 {
5  [Attribute("1", desc: "Returns true if all selected entities have less or equal to waypoint count")]
6  protected int m_iCount;
7 
8  override bool IsAvailable(SCR_AvailableActionsConditionData data)
9  {
10  if (!data)
11  return false;
12 
13  set <SCR_EditableEntityComponent> entities = new set <SCR_EditableEntityComponent>;
14  SCR_BaseEditableEntityFilter.GetEnititiesStatic(entities, EEditableEntityState.SELECTED);
15 
16  int count = 0;
17  int maxCount = 0;
18 
20  set <SCR_EditableEntityComponent> groupChildren = new set <SCR_EditableEntityComponent>;
21 
22  foreach (SCR_EditableEntityComponent entity: entities)
23  {
24  group = SCR_EditableGroupComponent.Cast(entity);
25 
26  if (group)
27  {
28  count = group.GetWaypointCount();
29 
30  if (count > maxCount)
31  maxCount = count;
32  }
33  }
34 
35  return GetReturnResult(maxCount <= m_iCount);
36  }
37 };
EEditableEntityState
EEditableEntityState
Definition: EEditableEntityState.c:37
SCR_EditorLessThenCountWaypointsActionCondition
Returns true if all selected entities have less or equal to waypoint count.
Definition: SCR_EditorLessThenCountWaypointsActionCondition.c:3
SCR_AvailableActionsConditionData
Definition: SCR_AvailableActionsConditionData.c:5
BaseContainerCustomStringTitleField
class SCR_HitZoneGroupNameHolder BaseContainerCustomStringTitleField("USE INHERENT VERSION ONLY!")
Definition: SCR_HitZoneGroupNameHolder.c:27
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_EditableGroupComponent
void SCR_EditableGroupComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_EditableGroupComponent.c:703
SCR_AvailableActionCondition
A single available action condition representation.
Definition: SCR_AvailableActionsCondition.c:3
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_BaseEditableEntityFilter
Definition: SCR_BaseEditableEntityFilter.c:13
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468