The built-in modules for creating and modifying tasks do not assign tasks to clients who join in progress, even if their object has these tasks assigned.
Description
Details
- Legacy ID
- 3032046063
- Severity
- Major
- Resolution
- Fixed
- Reproducibility
- Always
- Category
- Design-Mission
Create two units
Create trigger encompassing these two units that will be triggered by these two units
Make both playable
Create a task module that applies to all units within a synchronized trigger; synchronize this task module to the aforementioned trigger.
Have the host start the game without the other player present.
Have the other player join as the second unit. He will not see any tasks.
Event Timeline
I have had similar problems with tasks. Except now it's anytime I start an MP session, my custom mission tasks won't show up for anyone else, even if they are present for the start of the match.
Have tested offline and all works fine, maybe a desync issue?
It's the same even if the player is there at the start of the mission, I've tried every manner of options the modules give me but I cannot get any other player other than myself (the host) to get tasks.
Can't get any play other than myself (the host) to get tasks using these modules. Tried all options, group, individual objects, and objects within a trigger. Nothing works. The severity should be set to "major", the feature must be incomplete. It works for SP but not MP..
*EDIT* - I managed to get it to give tasks using the "objects in synchronized triggers" option, still nothing yet for the other 2.
Problem with using the trigger option is no players get tasks during briefing
see note: 0002272
I think this is related to a problem with modules not fixed in Arma 2. This is some general issue with modules (tested some time ago in Arma 2):
- Most module scripts only do inititialization at start and only check what it is synchronized to at the beginning of the mission. The mission starts, the module check what it is synchronized to, and initializes. If something else is then later synchronized then it doesn't matter since the module has already checked what it is synced to.
- More severe. Synchronization only works in a limited fashion. Non-server players are only really synchronized at the beginning of the mission. If someone joins-in-progress (JIP) later, then it is not synchronized! Meaning synchronization lines are useless if you want to support JIP. I didn't actually test respawn but looks like the symptoms are the same as JIP.
Basically any module synced to a playable (or respawnable) object suffers from this, like High Commander, this (Task modules), support request (http://feedback.arma3.com/view.php?id=2547). I never really bother to use these kinds of module because of this. It is a real shame since I like the idea, however, they are inherently broken for (JIP and respawn). If the second point I made was fixed at least the community could create some useful modules.
---
One way to fix this could be to actually registers JIP and then raise some kind of event to be used by module scripters. Example in module script:
_myModuleObject addEventHandler ["Synchronized", {
//Add the unit to some internal list used by the script or something. TAG_MyModule_Units set [count TAG_MyModule_Units, (_this select 0)];
}];
I've done some thorough testing with synchronization and respawn and jip.
Setup:
Player, called 'TheLeader' is synchronized to grouped AI 'Subordinate' and ungrouped AI 'OtherDude' and object 'AnObject'. Two radio triggers, 'Client Perspective', and 'Server Perspective', hints what TheLeader (the player) is synchronized to, ServerPerspective using publicVariable to send it to player machine.
Third radio trigger resyncs TheLeader with all three units/objects. Basic respawn using 'base' is also incorporated. Finally another unit, HostedServerUnit, neither synced nor grouped to anything used to launch a hosted server.
Results:
Singleplayer:
Server Perspective: TheLeader synchronized to all 3 objects.
Client Perspective: TheLeader synchronized to all 3 objects.
Multiplayer:
Hosted Server (player join at start):
Server Perspective: TheLeader synchronized to all 3 objects.
Client Perspective: TheLeader is NOT synchronized to anything!
Hosted Server (player respawns):
Server Perspective: TheLeader synchronized to all 3 objects.
Client Perspective: TheLeader is NOT synchronized to anything!
Hosted Server (player JIPs):
Server Perspective: TheLeader is NOT synchronized to anything!
Client Perspective: TheLeader is NOT synchronized to anything!
Dedicated Server (player join at start):
Server Perspective: TheLeader synchronized to all 3 objects.
Client Perspective: TheLeader is NOT synchronized to anything!
Dedicated Server (player respawns):
Server Perspective: TheLeader synchronized to all 3 objects.
Client Perspective: TheLeader is NOT synchronized to anything!
Dedicated Server (player JIPs):
Server Perspective: TheLeader is NOT synchronized to anything!
Client Perspective: TheLeader is NOT synchronized to anything!
On respawn 'player' references another (new) object. This new object is attached to the name (editor name reference??) TheLeader. The old object reference is also attached to that editor name! That is both the old player object and the new player object is called 'TheLeader' if you output it, however, they are different objects. The new 'TheLeader' is synchronized to the objects, the old is no longer!.
Activating the resync triggers makes TheLeader syncronized to all 3 units again. (Since radio triggers run on all machines).
Issues:
Notice the symmetries in the cases for multiplayer.
Issues with modules and respawn are caused since player references another (new) object upon respawn. This new object is still synchronized on the server side, however, most module scripts will already have checked what they are synchronized to at this point.
Issues with modules and JIP are caused by JIP objects not being registered as synchronized. Even if they were the some module scripts will still have to be changed to check for new synchronizations. However, this would not suffice in JIP situations since you cannot discover any new synchronizations.
For proper respawn and JIP safe modules RE-synchronization needs to be implemented, at least on the serverside.
EDIT:
Should this be posted as a separate issue?
Players who JIP won't receive module synchronization, and are therefore invisible for the module.
However, "Create Task" module options were expanded to allow adding the task not only to synced units or their groups, but also to sides of synced units or even to all playable units.
So if you sync the module with any BLUFOR unit (and ideally not player, to make sure the unit is always there), the task will be added to all BLUFOR players.
The same option is available in the function BIS_fnc_taskCreate and in the core task function, BIS_fnc_setTask.