I was inspired with this script http://www.kylania.com/ex/?p=84, so I "translated" it to WICT's language, but I am qouting it from original site.
It’s abstracted, as in the evidence doesn’t become an inventory item, it just goes away and completes the task.
First place your player. Second place the evidence, named evi1, where you want it to be found. I used EMPTY -> Objects (Small) – Evidence (File2) for my example. Also place an EMPTY marker called obj1 there so the task system knows where to direct the player to look.
In the Init field of the evidence object I put the following:
evi1′s init field:
this addaction ["Collect evidence!", "collect.sqf"];
This will add an action to the folder allowing the player to use the item to collect it. The contents of the collect.sqf is as follows:
deletevehicle evi1; task_report = ["task_name","s"]; publicVariable "task_report";
That will delete the item in game since you’ve “collected” it. Set your current task to SUCCEEDED and display a pretty hint window saying so. I also have a trigger with the condition of !alive (evi1) which plays some music when you find the folder.
You give the task by executing something like this:
[nil,nil,rEXECVM,"WICT\sandbox\sandbox_exe.sqf","WICT\sandbox\","taskCreator","City fountain","obj1","yes","Find evidence.","Near the fountain you'll find a blue folder. Pick it up.","yes","all"] call RE;