asierus 11 Posted August 27, 2015 well in my mission i have some items that can be used as resources like Land_Bricks_V1_F and well all its working well until i wat that object to be deleted after using the added action. on the object init this addAction ["Pick Resources", "addresources15.sqf", { deleteVehicle (_this select 0)}]; if i remove the "addresources15.sqf", it works well it deletes the object but if i use the sqf it doesnt , here is the addresources15.sqf content. private ["_Resources"]; // Get the current credits of my_factory _Resources = my_factory getVariable "R3F_LOG_CF_credits"; // Add 15 to the value _Resources = _Resources + 15; // Set the new credits my_factory setVariable ["R3F_LOG_CF_credits", _Resources, true]; _radarObject = _this select 0; _activatingPlayer = _this select 1; _actionId = _this select 2; _radarObject removeAction _actionId; im Using R3F Logistics. Any ideas please ? Share this post Link to post Share on other sites
Greenfist 1863 Posted August 27, 2015 You could just remove the deletevehicle from addaction and add it to the end of the script: deletevehicle _radarObject; this addAction ["Pick Resources", "addresources15.sqf", { deleteVehicle (_this select 0)}]; The problem here was that the red part is the executed script and green is supposed to be the argument passed to the script. Check Biki for more information: addAction Share this post Link to post Share on other sites
asierus 11 Posted August 27, 2015 thanks i will try > :) Edit: Thanks alot! it was so easy lol :) it worked perfectly. i wrote it _radarObject deletevehicle; < idiot of me i had it disordered haha :) Share this post Link to post Share on other sites