Search the Community
Showing results for tags 'task framework'.
Found 2 results
-
Using formatted localized strings with BIS_fnc_taskCreate
cidfr posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, Consider this key in the stringtable : <Key ID="STR_CID_FREE_CITY_TASK_DESCRIPTION"> <English>Clear %1 of ennemies</English> <!-- more languages --> </Key> Using a local context, I can easily do : private _localizedDescription = format [ localize "STR_CID_FREE_CITY_TASK_DESCRIPTION", _cityName ]; However, I'm wondering if it's possible to use such strings with BIS_fnc_taskCreate I could do [ _side, _taskID, [ format [ localize "STR_CID_FREE_CITY_TASK_DESCRIPTION", _cityName ], "some title", // could be localized too "" ] ] call BIS_fnc_taskCreate; But this will be evaluated server-side and the clients may receive strings in a language that doesn't match theirs I could remotely send the tasks creation on each clients with [ [ _side, _taskID, _cityName ], { [ /* same parameters than previous code */ ] call BIS_fnc_taskCreate; } ] remoteExec [ "spawn", 0, true ]; This may work, but will require extra work to sync the tasks between the clients and the server, update the JIP queue when a task has changed and probably more stuff And in my opinion, this will goes against the purpose of using the Task Framework, which already handle all of this and can send static localized strings to clients So far, the only clean solution I found was changing the description to a generic "Clear the zone of ennemies" and as title the _cityName. This is acceptable, but I was wondering if using formatted localized strings was possible using the Task Framework Thanks -
[SOLVED] BIS_fnc_taskSetState not working
kibaBG posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
In my mission I have Irani general to be killed otherwise he is getting to enemy barracks and the mission is failed. The problem is the vehicle with the general's group does not trigger task state to "FAILED". Here what I have to spawn the generals groups (working) : veh2 = "LOP_SYR_UAZ" createVehicle [4043.84,5518.31,4.76837e-007]; generalgrp = createGroup [east,true]; generalgrp addVehicle veh2; general = generalgrp createUnit ["O_Officer_Parade_Veteran_F", [4051.8,5504.99,0], [], 0, "NONE"]; guard1 = generalgrp createUnit ["LOP_IRAN_Infantry_SF_Grenadier", [4053.94,5508.33,0], [], 0, "CAN_COLLIDE"]; guard2 = generalgrp createUnit ["LOP_IRAN_Infantry_SF_Rifleman", [4052.81,5501.81,0], [], 0, "CAN_COLLIDE"]; generalgrp setBehaviour "CARELESS"; generalgrp setSpeedMode "LIMITED"; {_x limitSpeed 5} forEach units generalgrp; {_x assignAsCargo veh2} forEach units generalgrp; [general,guard1,guard2] orderGetIn true; guard1 assignAsDriver veh2; Group in spawned and gets in a vehicle. Order group to go to the barracks generalgrp move [3110.86,6298.28,0]; They move to barracks and then I want to use BIS_fnc_taskSetState to make the mission fail. A place a trigger, condition OPFOR present and on act : ["task5","FAILED",true] call BIS_fnc_taskSetState; The task is defined by trigger at the begining: private _myTask = [west,"task5","kill_general",objNull, "CREATED",-1,true,"kill",false] call BIS_fnc_taskCreate; And by this in description.ext : class CfgTaskDescriptions { class kill_general { title = "Kill the Irani general."; description = "Main task of phase one of the operation is finding and ellimination the Irani general. His demise will prevent the city to organize good defense. We have an informator, called Jafar, who will stop his vehicle next to the building where the general is hiding. Locate Jafar in the purple zone and tail his truck. Afterwards ged rid of Jafar and other witnesses if possible."; marker = ""; }; }; The problem is they don't activate the trigger ? and the task is not failed. If I just make condition true to this trigger it works ok. What is wrong? If the player kills the general task is succeeded without any problem with !alive general and: ["task5", "SUCCEEDED"] call BIS_fnc_taskSetState;