#(tut) How to create task: Deliver Intel to Crate
1 messages · Page 1 of 1 (latest)
Preparation: Open sample for SF-Sample-DeliverWeapoinsToCrate and copy WeaponsCrate entity to your world (just DragAndDrop that entity from Hierarchy to your project's folder)
1.) Create TaskDeliveryIntel as you always do and put SlotDeliver above where you want to place the crate (set it to be inaccessible- example- trigger radius 1m and at a height of 20m)
2.) Put Slot.et with ObjectToSpawn into another Layer.et and spawn copied WeaponsCrate
3.) On Slot.et open plugins and add OnInventoryChange.
4.) OnInvetoryChange action add CountInventoryItemsAndExecuteAction
5.) In CountInventoryItemsAndExecuteAction set getter to GetSpawnedEntity .In Layer Name type the name of the Slot.et with spawned crate and set prefab filter same as `SlotPick.et' in your TaskDeliverInter Layer ( it has to be the same or it won't work)
6.) On Actions to Execute add ChangeTaskState and put name of your LayerTaskDeliver into it
and that't it folks 😄
BONUS: If you want to delete an task item from the crate add another Action to Execute (same as step.6) and choose RemoveItemFromInventory. In getter: again GetSpawnedEntity with name of the slot with spawned crate and same item as SlotPick in Prefab Filter
‼️ The most important thing is the crate! (step preparation) If you spawn an arsenal crate, it won't work. ‼️
PS: It works with vehicles
⬆️⬆️⬆️