We used to be able to change the formation of an AI group via AIFormationComponent::SetFormation in earlier versions of Reforger, which no longer seem to work.
Description
Description
Details
Details
- Severity
- None
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 11 x64
- Category
- General
Steps To Reproduce
- Create the following script, which spawns a group and assigns column formation and a patrol waypoint.
//------------------------------------------------------------------------------------------------ modded class ArmaReforgerScripted : ChimeraGame { //------------------------------------------------------------------------------------------------ override bool OnGameStart() { SCR_AIGroup group = Test_SpawnGroup(); string formation = SCR_Enum.GetEnumName(SCR_EAIGroupFormation, SCR_EAIGroupFormation.Column); group.GetFormationComponent().SetFormation(formation); SCR_AIWaypoint waypoint = Test_SpawnWaypoint(); group.AddWaypoint(waypoint); return super.OnGameStart(); } //------------------------------------------------------------------------------------------------ protected SCR_AIGroup Test_SpawnGroup() { Resource res = Resource.Load("{FCF7F5DC4F83955C}Prefabs/Groups/BLUFOR/Group_US_LightFireTeam.et"); EntitySpawnParams params = new EntitySpawnParams(); params.TransformMode = ETransformMode.WORLD; params.Transform[3] = "77.727 3.723 22.795"; return SCR_AIGroup.Cast(GetGame().SpawnEntityPrefab(res, GetWorld(), params)); } //------------------------------------------------------------------------------------------------ protected SCR_AIWaypoint Test_SpawnWaypoint() { Resource res = Resource.Load("{C0A9A9B589802A5B}PrefabsEditable/Auto/AI/Waypoints/E_AIWaypoint_Patrol.et"); EntitySpawnParams params = new EntitySpawnParams(); params.TransformMode = ETransformMode.WORLD; params.Transform[3] = "104.76 -1.301 174.775"; return SCR_AIWaypoint.Cast(GetGame().SpawnEntityPrefab(res, GetWorld(), params)); } }
- Open SF-Tutorial-Navmesh.ent in world editor
- Switch to play mode
- Observer the formation of the spawned group while they move to the waypoint.