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

◆ SetInactive()

override void SetInactive ( bool stop_timer = true)
protected

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

153 {
154 super.SetInactive(stop_timer);
155
156 // de-attach attachments after "activating them"
157 GameInventory inventory = GetInventory();
158 for (int att = 0; att < inventory.AttachmentCount(); ++att)
159 {
160 ItemBase attachment = ItemBase.Cast(inventory.GetAttachmentFromIndex(att));
161 if (attachment)
162 {
163 if (attachment.IsLockedInSlot())
164 {
165 attachment.UnlockFromParent();
166 }
167
168 attachment.OnActivatedByItem(this);
169 inventory.DropEntity(InventoryMode.SERVER, this, attachment);
170 }
171 }
172 }
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().