DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ SetInactive()

override void SetInactive ( bool stop_timer = true)
protected

См. определение в файле Trap_TripWire.c строка 150

151 {
152 super.SetInactive(stop_timer);
153
154 // de-attach attachments after "activating them"
155 GameInventory inventory = GetInventory();
156 for (int att = 0; att < inventory.AttachmentCount(); ++att)
157 {
158 ItemBase attachment = ItemBase.Cast(inventory.GetAttachmentFromIndex(att));
159 if (attachment)
160 {
161 if (attachment.IsLockedInSlot())
162 {
163 attachment.UnlockFromParent();
164 }
165
166 attachment.OnActivatedByItem(this);
167 inventory.DropEntity(InventoryMode.SERVER, this, attachment);
168 }
169 }
170 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
proto native EntityAI GetAttachmentFromIndex(int index)
proto native int AttachmentCount()
Returns count of attachments attached to this item.
bool DropEntity(InventoryMode mode, EntityAI owner, notnull EntityAI item)
script counterpart to engine's class Inventory

Перекрестные ссылки GameInventory::AttachmentCount(), GameInventory::DropEntity() и GameInventory::GetAttachmentFromIndex().