yamajin82 10 Posted July 7, 2013 Hi, I am working on a mission where an enemy officer is carrying a briefcase that bluefor needs to retrieve. I've got the briefcase working (attaches to the players torso rather than added to his inventory) and I need a trigger for task accomplished upon retrieving it. Any help would be awesome, thanks! Share this post Link to post Share on other sites
cuel 25 Posted July 7, 2013 So it's just an addAction for picking it up? A simple way would be to just add a trigger, condition !(isNil "TAG_myVar") and then have whatever on act you want in the addAction code or script you add if (isNil "TAG_myVar") then {TAG_myVar = true; publicVariable "TAG_myVar"}; If you have a point where the player needs to deliever to briefcase you can just check the distance suitcase distance (markerPos "dropoff") < 20 Share this post Link to post Share on other sites
yamajin82 10 Posted July 7, 2013 That's looking very promising, I'll give it a go tonight and report back, many thanks! ---------- Post added at 18:40 ---------- Previous post was at 18:34 ---------- I'm not at home right now but I'm pretty sure this is what I used: //act1 = this addaction ["Take Case","carry.sqf",[0],1,false,true,"",""] taken = _this select 3; take = taken select 0; switch (take) do { case 0: { scase = _this select 0; _man = _this select 1; scase attachto [_man, [0.035,-.055,-0.22], "LeftHandMiddle1"]; scase setdir 90; scase removeAction act1; act1 = _man addaction ["Drop Case","scripts\grab.sqf",[1],1,false,true,"","side player == civilian"]; _man addEventHandler ["killed", "detach scase;_man removeeventHandler [""killed"",0]"]; }; case 1: { _man = _this select 0; detach scase; scase setvelocity[0,0,-.3]; _man removeAction act1; act1 = scase addaction ["Take Case","scripts\grab.sqf",[0],1,false,true,"","side player == civilian"]; _man removeeventHandler ["killed",0]; }; }; Share this post Link to post Share on other sites