tapull 0 Posted January 4, 2024 Hi im triying to setup a waypoint "on-activation"-script for the task to liberate 3 villages. I want it to check when triggered if there is still enemy units in the trigger area. When there are none left its liberated : which means it should add +1 to liberated villages (3 villages in total). But my script doesnt seem to work. Please i need help. Happy New Year btw ! Screenshots : file:///C:/Users/taras/Downloads/script%20help/problem.PNG Condition : !((count (units group thisList) > 0) && {(side _x == east) || (side _x == resistance)} count (units group thisList) > 0) On activation : _taskName = "Liberate Villages"; _villageName = "Pavlokhov"; if (!(taskState [_taskName, _villageName])) then { taskSetState [_taskName, _villageName, true]; _liberatedVillages = 0; { if (taskState [_taskName, _x]) then { _liberatedVillages = _liberatedVillages + 1; }; } forEach ["Pavlokhov", "Novoshny", "Solnevny"]; hint format ["%1 Villages Liberated! Move on.", _liberatedVillages]; }; Share this post Link to post Share on other sites
j0nes 194 Posted January 4, 2024 check out the syntax for https://community.bistudio.com/wiki/setTaskState. It looks like youre not giving it the arguments it wants. in your case it would be something like _taskName taskSetState "COMPLETED"; Im not sure what you're doing with that array you're passing: [_taskName, _villageName] doesnt mean anything in this context. Also consider using https://community.bistudio.com/wiki/Arma_3:_Task_Framework. its much cleaner than the simple task stuff for most applications Share this post Link to post Share on other sites