-
Content Count
2 -
Joined
-
Last visited
-
Medals
Everything posted by SukaBlyad034
-
Issues with BIS_fnc_taskSetState
SukaBlyad034 replied to SukaBlyad034's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Oh boy, went above and beyond with that one. I can finally move into developing further tasks with this problem clarified. Thank you so much. <3 Seeing as the tasks remained in the player's task list after switching sides, I had wrongly assumed that the taskID string was all that mattered and that when the target parameter of BIS_fnc_setTask was given a side, it would act as if I'd given the function an array of all units from that side. I doubt it would have occurred to me at all that changing sides would orphan those tasks, unless I had tried to test this with the Blufor VIP at some point, which I didn't. I've implemented your other advisories as well, though I've had to preserve the side of each VIP via an additional parameter due to all bases having a trigger that changes their side to west at the beginning of the mission (So the players don't get shot on approach). -
Issues with BIS_fnc_taskSetState
SukaBlyad034 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
So I've been having issues getting my tasks to switch state when a player activates an action from specific units on the map. The links provided throughout the post takes you to the Github where this mission resides, just in case more context is needed. The tasks are created during server initialization with BIS_fnc_setTask: ... ["beginTask", BLUFOR, ["Or perhaps they can, that's up to you.<br/><br/>Either way, you and your questionably living crew are going to have to secure some kind of assistance and arsenal. Just last night, Jarate and a few other useless souls got the chop over there in that tent of yours - you can't keep this up anymore. Guns, ammo and food don't grow on trees either.<br/><br/>... Well, food might, but you lot are just desk sitters. What do you know?", "The living cannot survive alone", "This shouldn't show up"], getMarkerPos "respawn_west", "ASSIGNED", 0, true, true, "whiteboard", false] call BIS_fnc_setTask; [["indepTask", "beginTask"], BLUFOR, ["So you've decided to go at it alone. Kind of.<br/><br/>A ragtag group of Chernarus National Guard and PMCs just north of your doomed encampment have setup shop near Zelenogorsk at the Green Mountain radio tower. They've been around the place during your scavenging runs and you've had some close calls with these folks. Can't blame 'em really, everyone else looks like the stuff of nightmares.<br/><br/>You might be able to get some trade going on with this lot with abit of luck, assuming their sentries don't put a bullet through your skull first.", "1. Independently Screwed", "1. Independently Screwed"], position VIPIndep, "CREATED", 1, true, true, "meet", false] call BIS_fnc_setTask; [["ruskieTask", "beginTask"], BLUFOR, ["Todo", "2. Russian Recollection", "2. Russian Recollection"], position VIPRuskie, "CREATED", 1, true, true, "meet", false] call BIS_fnc_setTask; [["mericaTask", "beginTask"], BLUFOR, ["Todo", "3. American Freedom", "3. American Freedom"], position VIPMerica, "CREATED", 1, true, true, "meet", false] call BIS_fnc_setTask; ... Three units around the map are given a variant of the following init code to run: this addAction ["Join Russia", { [EAST, _this#0, _this#2] remoteExec ["ZE_fnc_setSide", 2] }, nil, 1.5, true, true, "", "player distance VIPRuskie < 5", 5, false, ""]; The function called in the addAction activation code remote executes a server side function which manages the side changes and attempts to change the task states towards the end of the file: ... publicVariable "zSideJIP"; switch(zSideJIP) do { case independent: { ["indepTask", "SUCCEEDED", true] call BIS_fnc_taskSetState; ["ruskieTask", "CANCELED", false] call BIS_fnc_taskSetState; ["mericaTask", "CANCELED", false] call BIS_fnc_taskSetState; }; case east: { ["indepTask", "CANCELED", false] call BIS_fnc_taskSetState; ["ruskieTask", "SUCCEEDED", true] call BIS_fnc_taskSetState; ["mericaTask", "CANCELED", false] call BIS_fnc_taskSetState; }; case west: { ["indepTask", "CANCELED", false] call BIS_fnc_taskSetState; ["ruskieTask", "CANCELED", false] call BIS_fnc_taskSetState; ["mericaTask", "SUCCEEDED", true] call BIS_fnc_taskSetState; }; }; ["beginTask", "SUCCEEDED", true] call BIS_fnc_taskSetState; Unfortunately, the function completes everything except the change in task states and I'm not really sure how to proceed, considering the wiki tells me that the framework supposedly manages the synchronization so long as I've dealt with it on the server. Any ideas?