11 if (!FindAttachmentBySlotName(
"Scarh_FrontSight"))
15 GetInventory().CreateAttachment(
"Scarh_Front_Sight");
20 ForceSyncSelectionState();
26 super.EEItemAttached(item, slot_name);
33 super.EEItemDetached(item, slot_name);
40 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
52 entity = FindAttachmentBySlotName(
"Scarh_FrontSight");
55 entity.SetHealth01(
"",
"Health", GetHealth01());
61 EntityAI optic = FindAttachmentBySlotName(
"weaponOptics");
63 if (optic && !optic.IsKindOf(
"BUISOptic"))
65 SetAnimationPhase(
"opticAttached", 1.0);
69 SetAnimationPhase(
"opticAttached", 0.0);
94 SpawnAttachedMagazine(
"Mag_SCARH_20Rnd");
EntityAI CreateInInventory(string type)
creates entity somewhere in inventory
script counterpart to engine's class Inventory
override void AssembleGun()
void SetAttachmentsHealth()
void UpdateFoldingSightState()
override void EEItemDetached(EntityAI item, string slot_name)
override RecoilBase SpawnRecoilObject()
override void OnDebugSpawn()
override void EEItemAttached(EntityAI item, string slot_name)
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)