CoolSpy 9 Posted June 19, 2018 Hi guys, I am working on a mission where the players need to pickup a backpack named "B_Messenger_Coyote_F" on one of the enemies but could not find the right commands to use in the condition box. Also, is there some way to put the "Land_Money_F" item in the backpacks ? (it's a cosmetic item, a stack of dollars, not meant to be used by players) I need help, thanks in advance ;) Share this post Link to post Share on other sites
Grumpy Old Man 3544 Posted June 19, 2018 Try this: //init field of player or wherever you seem fit: this addEventHandler ["Take", { params ["_unit", "_container", "_item"]; if (_container isEqualTo YourBackPackUnit AND _item isEqualTo "B_Messenger_Coyote_F") then {systemchat "Backpack taken!"}; }]; Place a unit holding the respective backpack and name it YourBackPackUnit. Should do the trick. Adding the money pile as item isn't possible without a mod, as far as I know. Cheers 3 Share this post Link to post Share on other sites
CoolSpy 9 Posted June 19, 2018 30 minutes ago, Grumpy Old Man said: Try this: //init field of player or wherever you seem fit: this addEventHandler ["Take", { params ["_unit", "_container", "_item"]; if (_container isEqualTo YourBackPackUnit AND _item isEqualTo "B_Messenger_Coyote_F") then {systemchat "Backpack taken!"}; }]; Place a unit holding the respective backpack and name it YourBackPackUnit. Should do the trick. Adding the money pile as item isn't possible without a mod, as far as I know. Cheers This worked, thanks so much! I got the message "Backpack taken" as soon as I pick it up. Now, how do I make it complete a task once this is done please ? :) Share this post Link to post Share on other sites
Grumpy Old Man 3544 Posted June 20, 2018 9 hours ago, coolspy said: This worked, thanks so much! I got the message "Backpack taken" as soon as I pick it up. Now, how do I make it complete a task once this is done please ? :) There's multiple ways. How are you handling your tasks? Via script or editor modules? Cheers 1 Share this post Link to post Share on other sites
CoolSpy 9 Posted June 20, 2018 Editor modules. I am still a newbie in mission editing so, I have still alot to learn! Sorry if the implementation should be obvious :) Share this post Link to post Share on other sites
Grumpy Old Man 3544 Posted June 20, 2018 3 hours ago, coolspy said: Editor modules. I am still a newbie in mission editing so, I have still alot to learn! Sorry if the implementation should be obvious :) Set it up like this: //initPlayerLocal.sqf player addEventHandler ["Take", { params ["_unit", "_container", "_item"]; if (_container isEqualTo YourBackPackUnit AND _item isEqualTo "B_Messenger_Coyote_F") then {missionNamespace setVariable ["GOM_fnc_backpackTaken",true,true]}; }]; Trigger condition that changes task state: time > 3 AND missionNamespace getVariable ["GOM_fnc_backpackTaken",false] Demo mission. Cheers 1 Share this post Link to post Share on other sites
CoolSpy 9 Posted June 20, 2018 It works like a charm!!! Thanks alot buddie :) Share this post Link to post Share on other sites