Jump to content
Sign in to follow this  
sproyd

Using selectPlayer and carrying over Tasks

Recommended Posts

I'm building a SP mission and at one point in the mission I use the selectPlayer command to switch the player to another unit. All is working well except that the existing Tasks don't carry over to the new unit, only tasks created subsequent to the change of player unit.

My tasks modules are set up all Playable characters and the new unit (lets call him newguy) is set up as playable. I've also tried "Sides of Synchronized Units" but that doesn't work either. I'm guessing the issue is that A3 in SP mode only has one player and hence doesn't bother assigning tasks to Playable AI characters which aren't currently the Player (even though teamswitch is on).

Any ideas how I can carry over the task list to the new unit? Otherwise upon mission completion the player will only see tasks they completed under control of newguy and not the 5 or so prior tasks.

Thanks!

Share this post


Link to post
Share on other sites

It works fine for me using 'Sides of synch'd objects', but it does not work for 'All playable units'. Test this and see if it works:

Place a player unit and a playable unit. It does not matter if they are grouped or not.

Place a create task module. Set owner to synch'd objects only. In the description and title field enter some text, to confirm the task is working properly.

Synch the task to both units.

Preview the mission and switch between the units. They should both have the task.

The tasks cannot be transferred to the new unit. Each unit receives a unique task, even if they appear to be the same and complete at the same time. The modules (rather the scripts behind them) organize the actual task names so that the tasks given to many units looks like the same task, but they are not. You must create the individual tasks for each object. This gets even more complex in multiplayer, where tasks are local data to the client where they were created. Luckily, modules and task systems deal with all this internally.

Share this post


Link to post
Share on other sites

Okay so you are right - it only works if the Create Task is actively synced with all units that you want to have that task (or a duplicate of it).

The Groups of Synchronized Objects, Sides of Synchronized Objects and All Playable Units DO NOT WORK AS SPECIFIED. Every unit must be synched. Maybe not the case in MP.

This is actually a real pain in the ass as things get really messy having sync lines from every task going to every playable unit.............................

I will create a ticket.

http://feedback.arma3.com/view.php?id=14897

Edited by sproyd

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×