5 [
Attribute(
"-1", UIWidgets.ResourceNamePicker,
"Pick a prefab for this tree part",
"et")]
8 ref array<ref SCR_TreePartHierarchyV2> m_aChildren;
10 #ifdef ENABLE_DESTRUCTION
11 void SpawnAllChildren(IEntity parent, array<SCR_TreePartV2> treeParts =
null)
17 for (
int i = 0; i < count; i++)
25 if (!resource.IsValid())
29 parent.GetTransform(mat);
31 ArmaReforgerScripted game =
GetGame();
35 IEntity ent = game.SpawnEntityPrefab(resource);
37 if (RplSession.Mode() == RplMode.Client)
38 parent.AddChild(ent, -1, EAddChildFlags.AUTO_TRANSFORM);
39 else parent.AddChild(ent, -1, EAddChildFlags.NONE);
40 ent.SetTransform(mat);
47 treePart.m_vLockedOrigin = parent.GetOrigin();
48 treeParts.Insert(treePart);