Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_BallisticTableComponent.c
Go to the documentation of this file.
1[ComponentEditorProps(category: "GameScripted/Misc", description: "")]
5
6class SCR_BallisticTableComponent : SCR_DataDisplayGadgetComponent
7{
8 //------------------------------------------------------------------------------------------------
11 void ChangeShellType(int direction = 0)
12 {
13 if (direction == 0 || m_iNumberOfPages < 2)
14 return;
15
16 if (!m_wRenderTargetTexture)
17 return;
18
20 if (!data)
21 return;
22
23 ResourceName projectilePrefab;
25 if (currentData)
26 projectilePrefab = currentData.GetProjectilePrefab();
27
28 int newDataId = m_iCurrentPageID + direction;
29 SCR_VisualisedBallisticConfig replacementData;
30 while (newDataId != m_iCurrentPageID)
31 {
32 if (newDataId >= m_iNumberOfPages)
33 newDataId = 0;
34 else if (newDataId < 0)
35 newDataId = m_iNumberOfPages - 1;
36
37 replacementData = SCR_VisualisedBallisticConfig.Cast(data.GetPage(newDataId));
38 if (replacementData && replacementData.GetProjectilePrefab() != projectilePrefab)
39 break;
40
41 newDataId += direction;
42 }
43
44 if (newDataId == m_iCurrentPageID)
45 return;
46
47 m_iCurrentPageID = newDataId;
48 UpdateData();
49 }
50}
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
SCR_BallisticTableComponentClass SCR_DataDisplayGadgetComponentClass ChangeShellType(int direction=0)
SCR_CharacterSoundComponentClass GetComponentData()
int m_iCurrentPageID
int m_iNumberOfPages
void UpdateData(bool playSound=true)
Method used to update currently displayed ballistic data.
vector direction
Get all prefabs that have the spawner data
IEntity GetOwner()
Owner entity of the fuel tank.